Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: try_find_clients_endpoints #184

Open
wants to merge 1 commit into
base: alpha
Choose a base branch
from

Conversation

GermanVor
Copy link

(base) i113963096:nodejs-sdk zzman$ npm run try_find_clients_endpoints

> @yandex-cloud/[email protected] try_find_clients_endpoints
> ts-node scripts/try_find_clients_endpoints


 ai/assistants/v1 12
[ 'assistant.api.cloud.yandex.net:443' ] [ 'ai-assistants' ]



 ai/dataset/v1 5
[ 'datasphere.api.cloud.yandex.net:443' ] [ 'datasphere' ]



 ai/files/v1 7
[ 'assistant.api.cloud.yandex.net:443' ] [ 'ai-files' ]



 ai/foundation_models/v1 12
[ 'llm.api.cloud.yandex.net:443' ] [ 'ai-foundation-models' ]



 ai/llm/v1alpha 5
[ 'llm.api.cloud.yandex.net:443' ] [ 'ai-llm' ]



 ai/ocr/v1 2
[
  'assistant.api.cloud.yandex.net:443',
  'assistant.api.cloud.yandex.net:443',
  'llm.api.cloud.yandex.net:443',
  'llm.api.cloud.yandex.net:443',
  'transcribe.api.cloud.yandex.net:443',
  'transcribe.api.cloud.yandex.net:443',
  'stt.api.cloud.yandex.net:443',
  'translate.api.cloud.yandex.net:443',
  'vision.api.cloud.yandex.net:443',
  'ocr.api.cloud.yandex.net:443',
  'iot-broker.api.cloud.yandex.net:443',
  'iot-data.api.cloud.yandex.net:443',
  'iot-devices.api.cloud.yandex.net:443'
] [
  'ai-assistants',
  'ai-files',
  'ai-foundation-models',
  'ai-llm',
  'ai-speechkit',
  'ai-stt',
  'ai-stt-v3',
  'ai-translate',
  'ai-vision',
  'ai-vision-ocr',
  'iot-broker',
  'iot-data',
  'iot-devices'
]



 ai/stt/v2 6
[ 'stt.api.cloud.yandex.net:443' ] [ 'ai-stt-v3' ]



 ai/stt/v3 7
[ 'stt.api.cloud.yandex.net:443' ] [ 'ai-stt-v3' ]



 ai/translate/v2 11
[ 'translate.api.cloud.yandex.net:443' ] [ 'ai-translate' ]



 ai/tts/v3 3
[ 'translate.api.cloud.yandex.net:443' ] [ 'ai-translate' ]



 ai/tuning/v1 3
[ 'translate.api.cloud.yandex.net:443' ] [ 'ai-translate' ]



 ai/vision/v1 8
[ 'vision.api.cloud.yandex.net:443', 'ocr.api.cloud.yandex.net:443' ] [ 'ai-vision', 'ai-vision-ocr' ]



 ai/vision/v2 8
[ 'vision.api.cloud.yandex.net:443', 'ocr.api.cloud.yandex.net:443' ] [ 'ai-vision', 'ai-vision-ocr' ]



 airflow/v1 2
[
  'assistant.api.cloud.yandex.net:443',
  'assistant.api.cloud.yandex.net:443',
  'llm.api.cloud.yandex.net:443',
  'llm.api.cloud.yandex.net:443',
  'transcribe.api.cloud.yandex.net:443',
  'transcribe.api.cloud.yandex.net:443',
  'stt.api.cloud.yandex.net:443',
  'translate.api.cloud.yandex.net:443',
  'vision.api.cloud.yandex.net:443',
  'ocr.api.cloud.yandex.net:443',
  'load-balancer.api.cloud.yandex.net:443',
  'loadtesting.api.cloud.yandex.net:443',
  'locator.api.cloud.yandex.net:443',
  'lockbox.api.cloud.yandex.net:443',
  'payload.lockbox.api.cloud.yandex.net:443',
  'ingester.logging.yandexcloud.net:443',
  'reader.logging.yandexcloud.net:443',
  'logging.api.cloud.yandex.net:443'
] [
  'ai-assistants',        'ai-files',
  'ai-foundation-models', 'ai-llm',
  'ai-speechkit',         'ai-stt',
  'ai-stt-v3',            'ai-translate',
  'ai-vision',            'ai-vision-ocr',
  'load-balancer',        'loadtesting',
  'locator',              'lockbox',
  'lockbox-payload',      'log-ingestion',
  'log-reading',          'logging'
]



 apploadbalancer/v1 15
[ 'alb.api.cloud.yandex.net:443' ] [ 'apploadbalancer' ]



 audittrails/v1 11
[ 'audittrails.api.cloud.yandex.net:443' ] [ 'audittrails' ]



 backup/v1 6
[ 'backup.api.cloud.yandex.net:443' ] [ 'backup' ]



 billing/v1 7
[ 'billing.api.cloud.yandex.net:443' ] [ 'billing' ]



 cdn/v1 3
[ 'cdn.api.cloud.yandex.net:443' ] [ 'cdn' ]



 certificatemanager/v1 18
[
  'certificate-manager.api.cloud.yandex.net:443',
  'data.certificate-manager.api.cloud.yandex.net:443'
] [ 'certificate-manager', 'certificate-manager-data' ]



 cic/v1 3
[ 'cic-api.api.cloud.yandex.net:443' ] [ 'cic' ]



 cloudapps/workload/v1 9
[ 'cloudapps.api.cloud.yandex.net:443' ] [ 'cloudapps' ]



 cloudregistry/v1 13
[ 'registry.api.cloud.yandex.net:443' ] [ 'cloud-registry' ]



 cloudrouter/v1 11
[ 'cic-api.api.cloud.yandex.net:443' ] [ 'cloudrouter' ]



 compute/v1 7
[ 'compute.api.cloud.yandex.net:443' ] [ 'compute' ]



 containerregistry/v1 17
[ 'container-registry.api.cloud.yandex.net:443' ] [ 'container-registry' ]



 dataproc/manager/v1 15
[ 'dataproc-manager.api.cloud.yandex.net:443' ] [ 'dataproc-manager' ]



 dataproc/v1 8
[
  'dataproc.api.cloud.yandex.net:443',
  'dataproc-manager.api.cloud.yandex.net:443'
] [ 'dataproc', 'dataproc-manager' ]



 datasphere/v1 10
[ 'datasphere.api.cloud.yandex.net:443' ] [ 'datasphere' ]



 datasphere/v2 10
[ 'datasphere.api.cloud.yandex.net:443' ] [ 'datasphere' ]



 datatransfer/v1 12
[ 'datatransfer.api.cloud.yandex.net:443' ] [ 'datatransfer' ]



 dns/v1 3
[ 'dns.api.cloud.yandex.net:443' ] [ 'dns' ]



 endpoint 8
[ 'api.cloud.yandex.net:443' ] [ 'endpoint' ]



 iam/v1 3
[ 'iam.api.cloud.yandex.net:443' ] [ 'iam' ]



 iot/broker/v1 9
[ 'iot-broker.api.cloud.yandex.net:443' ] [ 'iot-broker' ]



 iot/devices/v1 10
[ 'iot-devices.api.cloud.yandex.net:443' ] [ 'iot-devices' ]



 k8s/marketplace/v1 11
[
  'marketplace.api.cloud.yandex.net:443',
  'mkt.private-api.cloud.yandex.net:4446'
] [ 'marketplace', 'marketplace-pim' ]



 k8s/v1 3
[ 'mks.api.cloud.yandex.net:443' ] [ 'k8s' ]



 kms/v1 3
[ 'kms.api.cloud.yandex.net:443', 'kms.yandex:443' ] [ 'kms', 'kms-crypto' ]



 loadbalancer/v1 12
[ 'load-balancer.api.cloud.yandex.net:443' ] [ 'load-balancer' ]



 loadtesting/agent/v1 11
[ 'loadtesting.api.cloud.yandex.net:443' ] [ 'loadtesting' ]



 loadtesting/api/v1 11
[ 'loadtesting.api.cloud.yandex.net:443' ] [ 'loadtesting' ]



 lockbox/v1 7
[
  'lockbox.api.cloud.yandex.net:443',
  'payload.lockbox.api.cloud.yandex.net:443'
] [ 'lockbox', 'lockbox-payload' ]



 logging/v1 7
[ 'logging.api.cloud.yandex.net:443' ] [ 'logging' ]



 marketplace/licensemanager/saas/v1 11
[
  'marketplace.api.cloud.yandex.net:443',
  'mkt.private-api.cloud.yandex.net:4446'
] [ 'marketplace', 'marketplace-pim' ]



 marketplace/licensemanager/v1 11
[
  'marketplace.api.cloud.yandex.net:443',
  'mkt.private-api.cloud.yandex.net:4446'
] [ 'marketplace', 'marketplace-pim' ]



 marketplace/metering/v1 11
[
  'marketplace.api.cloud.yandex.net:443',
  'mkt.private-api.cloud.yandex.net:4446'
] [ 'marketplace', 'marketplace-pim' ]



 marketplace/pim/v1 14
[ 'mkt.private-api.cloud.yandex.net:4446' ] [ 'marketplace-pim' ]



 marketplace/v1 11
[
  'marketplace.api.cloud.yandex.net:443',
  'mkt.private-api.cloud.yandex.net:4446'
] [ 'marketplace', 'marketplace-pim' ]



 mdb/clickhouse/v1 13
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-clickhouse' ]



 mdb/elasticsearch/v1 6
[ 'searchapi.api.cloud.yandex.net:443' ] [ 'searchapi' ]



 mdb/greenplum/v1 3
[
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdbproxy.api.cloud.yandex.net:443'
] [
  'mdb-clickhouse',
  'mdb-mongodb',
  'mdb-mysql',
  'mdb-opensearch',
  'mdb-postgresql',
  'mdb-redis',
  'mdbproxy'
]



 mdb/kafka/v1 3
[
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdb.api.cloud.yandex.net:443',
  'mdbproxy.api.cloud.yandex.net:443'
] [
  'mdb-clickhouse',
  'mdb-mongodb',
  'mdb-mysql',
  'mdb-opensearch',
  'mdb-postgresql',
  'mdb-redis',
  'mdbproxy'
]



 mdb/mongodb/v1 10
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-mongodb' ]



 mdb/mysql/v1 8
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-mysql' ]



 mdb/mysql/v1alpha 8
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-mysql' ]



 mdb/opensearch/v1 13
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-opensearch' ]



 mdb/postgresql/v1 13
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-postgresql' ]



 mdb/redis/v1 8
[ 'mdb.api.cloud.yandex.net:443' ] [ 'mdb-redis' ]



 mdb/sqlserver/v1 6
[
  'serverless-apigateway.api.cloud.yandex.net:443',
  'serverless-containers.api.cloud.yandex.net:443',
  'serverless-eventrouter.api.cloud.yandex.net:443',
  'serverless-functions.api.cloud.yandex.net:443',
  'apigateway-connections.api.cloud.yandex.net:443',
  'serverless-triggers.api.cloud.yandex.net:443',
  'serverless-workflows.api.cloud.yandex.net:443',
  'events.eventrouter.serverless.yandexcloud.net:443'
] [
  'serverless-apigateway',
  'serverless-containers',
  'serverless-eventrouter',
  'serverless-functions',
  'serverless-gateway-connections',
  'serverless-triggers',
  'serverless-workflows',
  'serverlesseventrouter-events'
]



 monitoring/v3 10
[ 'monitoring.api.cloud.yandex.net:443' ] [ 'monitoring' ]



 operation 9
[ 'operation.api.cloud.yandex.net:443' ] [ 'operation' ]



 organizationmanager/v1 19
[ 'organization-manager.api.cloud.yandex.net:443' ] [ 'organizationmanager' ]



 resourcemanager/v1 15
[ 'resource-manager.api.cloud.yandex.net:443' ] [ 'resourcemanager' ]



 searchapi/v2 9
[ 'searchapi.api.cloud.yandex.net:443' ] [ 'searchapi' ]



 serverless/apigateway/v1 20
[ 'serverless-apigateway.api.cloud.yandex.net:443' ] [ 'serverless-apigateway' ]



 serverless/apigateway/websocket/v1 20
[ 'serverless-apigateway.api.cloud.yandex.net:443' ] [ 'serverless-apigateway' ]



 serverless/containers/v1 20
[ 'serverless-containers.api.cloud.yandex.net:443' ] [ 'serverless-containers' ]



 serverless/eventrouter/v1 21
[
  'serverless-eventrouter.api.cloud.yandex.net:443',
  'events.eventrouter.serverless.yandexcloud.net:443'
] [ 'serverless-eventrouter', 'serverlesseventrouter-events' ]



 serverless/functions/v1 19
[ 'serverless-functions.api.cloud.yandex.net:443' ] [ 'serverless-functions' ]



 serverless/mdbproxy/v1 10
[
  'serverless-apigateway.api.cloud.yandex.net:443',
  'serverless-containers.api.cloud.yandex.net:443',
  'serverless-eventrouter.api.cloud.yandex.net:443',
  'serverless-functions.api.cloud.yandex.net:443',
  'apigateway-connections.api.cloud.yandex.net:443',
  'serverless-triggers.api.cloud.yandex.net:443',
  'serverless-workflows.api.cloud.yandex.net:443',
  'events.eventrouter.serverless.yandexcloud.net:443'
] [
  'serverless-apigateway',
  'serverless-containers',
  'serverless-eventrouter',
  'serverless-functions',
  'serverless-gateway-connections',
  'serverless-triggers',
  'serverless-workflows',
  'serverlesseventrouter-events'
]



 serverless/triggers/v1 18
[ 'serverless-triggers.api.cloud.yandex.net:443' ] [ 'serverless-triggers' ]



 serverless/workflows/v1 19
[ 'serverless-workflows.api.cloud.yandex.net:443' ] [ 'serverless-workflows' ]



 smartcaptcha/v1 12
[ 'smartcaptcha.api.cloud.yandex.net:443' ] [ 'smart-captcha' ]



 smartwebsecurity/v1 16
[ 'smartwebsecurity.api.cloud.yandex.net:443' ] [ 'smart-web-security' ]



 speechsense/v1 2
[
  'api.cloud.yandex.net:443',
  'searchapi.api.cloud.yandex.net:443',
  'serialssh.cloud.yandex.net:9600',
  'serverless-apigateway.api.cloud.yandex.net:443',
  'serverless-containers.api.cloud.yandex.net:443',
  'serverless-eventrouter.api.cloud.yandex.net:443',
  'serverless-functions.api.cloud.yandex.net:443',
  'apigateway-connections.api.cloud.yandex.net:443',
  'serverless-triggers.api.cloud.yandex.net:443',
  'serverless-workflows.api.cloud.yandex.net:443',
  'events.eventrouter.serverless.yandexcloud.net:443'
] [
  'endpoint',
  'searchapi',
  'serialssh',
  'serverless-apigateway',
  'serverless-containers',
  'serverless-eventrouter',
  'serverless-functions',
  'serverless-gateway-connections',
  'serverless-triggers',
  'serverless-workflows',
  'serverlesseventrouter-events'
]



 storage/v1 7
[ 'storage.yandexcloud.net:443', 'storage.api.cloud.yandex.net:443' ] [ 'storage', 'storage-api' ]



 video/v1 5
[ 'video.api.cloud.yandex.net:443' ] [ 'video' ]



 vpc/v1 3
[ 'vpc.api.cloud.yandex.net:443' ] [ 'vpc' ]



 ydb/v1 3
[ 'ydb.api.cloud.yandex.net:443' ] [ 'ydb' ]


(base) i113963096:nodejs-sdk zzman$ 

@GermanVor GermanVor requested a review from DavyJohnes January 27, 2025 15:06
@GermanVor
Copy link
Author

выглядит так, как будто мы никогда однозначно не сможем угадывать ендпоинт клиентов через GET https://api.cloud.yandex.net/endpoints

"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"lib": ["es6", "DOM"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем DOM?

@@ -169,7 +169,8 @@
"build:services": "ts-node scripts/build_services",
"build:mono-service": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" tsc -p .",
"build": "npm run build:mono-service && npm run build:services",
"typecheck:clients": "tsc -p ./clients --noEmit"
"typecheck:clients": "tsc -p ./clients --noEmit",
"try_find_clients_endpoints": "ts-node scripts/try_find_clients_endpoints"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"try_find_clients_endpoints": "ts-node scripts/try_find_clients_endpoints"
"discover-endpoints": "ts-node scripts/discover-endpoints"

?

};

const main = async () => {
const resp = await fetch('https://api.cloud.yandex.net/endpoints', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Было бы круто еще endpoint принимать аргументом, чтобы другие инсталляции тыкать можно было.

type EndpointType = { id: string; address: string };

const buildEndpointsMap = (endpoints: EndpointType[]) => {
return new Map(endpoints.map(({ id, address }) => [id.split('-').join(''), { address, id }]));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Какой интересный способ сделать .replaceAll() :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants