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

Alpha #119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Alpha #119

wants to merge 3 commits into from

Conversation

DavyJohnes
Copy link
Contributor

No description provided.

DavyJohnes and others added 3 commits March 13, 2023 18:48
BREAKING CHANGE: Session.client doesn't accept custom endpoint anymore
# [3.0.0-alpha.1](v2.4.2...v3.0.0-alpha.1) (2023-03-13)

* feat!: use standalone class for resolving service endpoints ([d9b00eb](d9b00eb))

### BREAKING CHANGES

* Session.client doesn't accept custom endpoint anymore
@personaljs
Copy link

проверил, работает! Спасибо:)

serviceIds: string[];
endpoint: string;
}

type ServiceEndpointsList = ServiceEndpoint[];
export type ServiceSlug =
Copy link
Contributor

Choose a reason for hiding this comment

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

Не очень понимаю зачем это, если они не соответствуют id https://api.cloud.yandex.net/endpoints

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Не очень понимаю зачем это, если они не соответствуют id 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.

Проблема в автоматическом построении. Из-за того что тип ServiceSlug это перечисление констант, сложно на основе данных /endpoints скриптом собрать объект нужной формы. TypeScript ругается.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Проблема в автоматическом построении. Из-за того что тип ServiceSlug это перечисление констант, сложно на основе данных /endpoints скриптом собрать объект нужной формы. TypeScript ругается.

Так поди можно скриптик написать, который этим же типом оперирует и генерирует нужной формы объект?
Кстати было бы неплохо сюда положить такую функцию, которая на вход принимает эндпоинт, а на выходе ServiceEndpointsMap выплевывает.

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.

None yet

4 participants