Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
4cc0985
feat: generate-code and big models update
GermanVor Oct 3, 2024
d562dda
chore: return scripts
GermanVor Oct 11, 2024
89a35de
chore: ignore v1
GermanVor Oct 11, 2024
97c2452
chore: update exemples
GermanVor Oct 11, 2024
4c594b9
Merge pull request #168 from yandex-cloud/revival
DavyJohnes Oct 14, 2024
df1a751
chore(release): 3.0.0-alpha.1 [skip ci]
yandex-cloud-bot Oct 14, 2024
17621aa
feat: bump up min nodejs version
DavyJohnes Oct 14, 2024
7d2119a
feat: bump up min nodejs version
DavyJohnes Oct 14, 2024
695f34e
Merge pull request #169 from yandex-cloud/bump-alpha-ver
DavyJohnes Oct 14, 2024
b847ce2
feat: fake change to produce new release
DavyJohnes Oct 14, 2024
f5c557f
Merge pull request #170 from yandex-cloud/bump-alpha-ver
DavyJohnes Oct 14, 2024
7678338
chore(release): 3.0.0-alpha.2 [skip ci]
yandex-cloud-bot Oct 14, 2024
14dd9c9
feat: services
GermanVor Oct 30, 2024
4071bf9
chore: getServices
GermanVor Oct 30, 2024
edf5c70
chore: build_services script
GermanVor Oct 30, 2024
0079ed6
chore: cloudApi serviceClients
GermanVor Oct 30, 2024
6b736ee
chore: remove qwe
GermanVor Nov 1, 2024
8bd7adb
chore: remove webpack fallback
GermanVor Nov 6, 2024
c174848
Merge pull request #171 from yandex-cloud/sub-services
DavyJohnes Nov 12, 2024
78a2199
chore(release): 3.0.0-alpha.3 [skip ci]
yandex-cloud-bot Nov 12, 2024
356afc7
chore: modifyPackageJSON
GermanVor Nov 20, 2024
3024996
Merge pull request #173 from yandex-cloud/package-files
DavyJohnes Nov 20, 2024
e82bf87
feat: release 3.0.0-alpha.4
GermanVor Nov 21, 2024
03a72af
Merge pull request #174 from yandex-cloud/trigger-release
DavyJohnes Nov 21, 2024
c8c35e5
chore(release): 3.0.0-alpha.4 [skip ci]
yandex-cloud-bot Nov 21, 2024
5c44a17
feat: by webpack, hi tsc
GermanVor Nov 21, 2024
54252eb
chore: sync tsc
GermanVor Nov 21, 2024
d1a384b
chore: prettier
GermanVor Nov 22, 2024
419da5b
chore: assistant example update
GermanVor Nov 29, 2024
5d1223f
Merge pull request #175 from yandex-cloud/trigger-release
DavyJohnes Dec 7, 2024
ac6ca19
chore(release): 3.0.0-alpha.5 [skip ci]
yandex-cloud-bot Dec 7, 2024
5bb772f
chore: chat with assistant example
GermanVor Dec 8, 2024
7fdfe15
feat: update services
GermanVor Dec 9, 2024
812dece
Merge pull request #176 from yandex-cloud/correct-example
DavyJohnes Dec 9, 2024
4ef0eb5
Merge pull request #177 from yandex-cloud/update-cloud-api
DavyJohnes Dec 9, 2024
364e0c7
chore(release): 3.0.0-alpha.6 [skip ci]
yandex-cloud-bot Dec 9, 2024
c0b16ac
feat: ai-assistants-v1 sdk
GermanVor Dec 16, 2024
93cd9d8
chore: modifyPackageJSON
GermanVor Dec 16, 2024
92c2b53
chore: export SDK
GermanVor Dec 16, 2024
56ddf8c
chore: finally null
GermanVor Dec 16, 2024
263d666
fix: exports
GermanVor Dec 17, 2024
ab8097f
chore: add example
GermanVor Dec 17, 2024
6b0b997
chore: return @typescript-eslint/indent
GermanVor Dec 18, 2024
4ac7875
chore: getLastRun
GermanVor Dec 20, 2024
28ca8af
chore: remove axtra exports
GermanVor Dec 24, 2024
4740eba
chore: remove public
GermanVor Dec 24, 2024
3137c86
chore: search clients
GermanVor Dec 24, 2024
aed6fe3
chore: add file sdk
GermanVor Dec 24, 2024
f982538
chore: add example
GermanVor Dec 25, 2024
48e0018
feat: foundation-model sdk
GermanVor Dec 20, 2024
ab76484
feat: operation sdk
GermanVor Dec 23, 2024
8b2dade
chore: decoder Handler
GermanVor Dec 27, 2024
6b7cc8b
chore: add example for search index
GermanVor Dec 27, 2024
3e59086
chore: exports
GermanVor Dec 29, 2024
60af6d7
chore: fix lint
GermanVor Jan 1, 2025
af3ae16
chore: decoders
GermanVor Jan 1, 2025
91f943b
feat: moved to src all sdk
GermanVor Jan 10, 2025
35e877e
feat: update for mono generated
GermanVor Jan 10, 2025
f41f368
Merge pull request #178 from yandex-cloud/assistant-sdk
DavyJohnes Jan 10, 2025
1efc71d
chore(release): 3.0.0-alpha.7 [skip ci]
yandex-cloud-bot Jan 10, 2025
94976c1
feat: exports
GermanVor Jan 13, 2025
d96f7b4
chore: short exports
GermanVor Jan 13, 2025
61017f9
chore: return files
GermanVor Jan 14, 2025
da1fb94
Merge pull request #182 from yandex-cloud/package-exports
DavyJohnes Jan 15, 2025
cccce9f
chore(release): 3.0.0-alpha.8 [skip ci]
yandex-cloud-bot Jan 15, 2025
592fef5
chore: add ClientCallArgs to export
GermanVor Jan 16, 2025
90cc395
feat: services update
GermanVor Jan 27, 2025
157d3e1
Merge pull request #185 from yandex-cloud/services-update
DavyJohnes Jan 28, 2025
54f1631
chore(release): 3.0.0-alpha.9 [skip ci]
yandex-cloud-bot Jan 28, 2025
fb7e4fc
feat: client call args
GermanVor Jan 28, 2025
acfb697
Merge pull request #183 from yandex-cloud/ClientCallArgs
DavyJohnes Jan 28, 2025
963f395
chore(release): 3.0.0-alpha.10 [skip ci]
yandex-cloud-bot Jan 28, 2025
00a7a2d
feat: dist clients
GermanVor Feb 12, 2025
0e1d11e
chore: cloudapi:update
GermanVor Feb 12, 2025
8086773
chore: proto path
GermanVor Feb 13, 2025
13e355a
chore: remove tsconfig from package
GermanVor Feb 13, 2025
de9a058
chore: test
GermanVor Feb 13, 2025
817330c
Merge pull request #186 from yandex-cloud/dist-clients
DavyJohnes Feb 14, 2025
6229486
chore(release): 3.0.0-alpha.11 [skip ci]
yandex-cloud-bot Feb 14, 2025
1b82dbc
chore: delete clients
GermanVor Feb 14, 2025
919881d
chore: delete tsconfig.prod.json
GermanVor Feb 14, 2025
0256a7d
chore: update examples package-lock
GermanVor Feb 14, 2025
873401f
chore: lint
GermanVor Feb 14, 2025
aaf90a5
Merge pull request #187 from yandex-cloud/delete-clients
DavyJohnes Feb 14, 2025
3128356
chore: try_find_clients_endpoints
GermanVor Jan 27, 2025
896e2f1
chore: discover_endpoints
GermanVor Feb 14, 2025
7ef9776
chore: replaceAll
GermanVor Feb 14, 2025
af12875
feat: service_endpoints_list
GermanVor Feb 14, 2025
7ef96e4
chore: add missing endpoints
GermanVor Feb 14, 2025
c899b9e
chore: names
GermanVor Feb 14, 2025
267f13f
chore: axios
GermanVor Feb 14, 2025
927133b
Merge pull request #188 from yandex-cloud/discover_endpoints
DavyJohnes Feb 14, 2025
9a4a862
chore(release): 3.0.0-alpha.12 [skip ci]
yandex-cloud-bot Feb 14, 2025
0aecf4f
feat: add exports
GermanVor Feb 14, 2025
4d76cff
Merge pull request #189 from yandex-cloud/package-new-exports-paths
DavyJohnes Feb 18, 2025
1af3b30
chore(release): 3.0.0-alpha.13 [skip ci]
yandex-cloud-bot Feb 18, 2025
9e190ce
feat: remove outputTypeRegistry
GermanVor Feb 19, 2025
e120945
chore: remove decode-message
GermanVor Feb 20, 2025
a8faaf4
chore: depencendies for examples
GermanVor Feb 20, 2025
b3559c9
chore: yml
GermanVor Feb 24, 2025
480506a
Merge pull request #191 from yandex-cloud/outputTypeRegistry
DavyJohnes Mar 7, 2025
5d93d6f
Merge branch 'master' into alpha
DavyJohnes Mar 8, 2025
12bf3b7
chore(release): 3.0.0-alpha.14 [skip ci]
yandex-cloud-bot Mar 8, 2025
769af47
feat: remove cloudApi
GermanVor Mar 14, 2025
f825865
chore: delete services
GermanVor Mar 14, 2025
3533778
feat: test
GermanVor Mar 14, 2025
35780e3
chore: sttService
GermanVor Mar 21, 2025
9be455e
Merge pull request #197 from yandex-cloud/cloud-api
DavyJohnes Mar 21, 2025
51115cf
chore(release): 3.0.0-alpha.15 [skip ci]
yandex-cloud-bot Mar 21, 2025
937eaa1
feat: update cloud-api
GermanVor Mar 31, 2025
31c8fa3
chore: endpoints
GermanVor Mar 31, 2025
74b3621
chore: partial
GermanVor Mar 31, 2025
28ca8a4
Merge pull request #198 from yandex-cloud/update-cloud-api
DavyJohnes Apr 2, 2025
1dfd9e9
chore(release): 3.0.0-alpha.16 [skip ci]
yandex-cloud-bot Apr 2, 2025
055a440
ci: use ubuntu-24.04
DavyJohnes Apr 22, 2025
d8fe728
Merge pull request #200 from yandex-cloud/update-ubuntu-in-ci
DavyJohnes Apr 22, 2025
9309606
feat: endpoints
GermanVor Apr 1, 2025
2235ee5
chore: test
GermanVor Apr 1, 2025
fe72c24
chore: test
GermanVor Apr 1, 2025
c152792
chore: throw
GermanVor Apr 9, 2025
7ccc975
chore: test
GermanVor Apr 22, 2025
171970a
Merge pull request #199 from yandex-cloud/service-endpoints-map
DavyJohnes Apr 22, 2025
cbf2ee3
chore(release): 3.0.0-alpha.17 [skip ci]
yandex-cloud-bot Apr 22, 2025
7992e39
ci: describe parameters
DavyJohnes May 15, 2025
2810c2c
ci: checkout submodules in tests
DavyJohnes May 15, 2025
ddfb839
Merge pull request #203 from yandex-cloud/checkout-submodules
DavyJohnes May 15, 2025
5371670
Merge branch 'master' into alpha
DavyJohnes May 28, 2025
fcfcc9a
chore(release): 3.0.0-alpha.18 [skip ci]
yandex-cloud-bot May 28, 2025
59337c3
Merge pull request #204 from yandex-cloud/alpha
DavyJohnes May 28, 2025
b9cc92f
chore(release): 3.0.0-beta.1 [skip ci]
yandex-cloud-bot May 28, 2025
1c81eeb
chore: update cloudapi
GermanVor Jun 4, 2025
7a76651
chore: baremetal
GermanVor Jun 6, 2025
5b15afb
Merge pull request #207 from yandex-cloud/beta-cloudapi-update
DavyJohnes Jun 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"extends": [
"@commitlint/config-conventional"
]
"extends": ["@commitlint/config-conventional"]
}
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

32 changes: 17 additions & 15 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"unicorn",
"import",
"prefer-arrow-functions"
],
"plugins": ["@typescript-eslint", "unicorn", "import", "prefer-arrow-functions"],
"parserOptions": {
"project": "tsconfig.eslint.json"
},
Expand All @@ -31,8 +26,8 @@
"import/prefer-default-export": "off",
"comma-dangle": ["error", "always-multiline"],
"indent": "off",
"@typescript-eslint/indent": ["error", 4],
"max-len": ["error", 140],
"@typescript-eslint/indent": ["error", 4],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/prefer-optional-chain": "error",
"prefer-arrow-functions/prefer-arrow-functions": ["error"],
Expand All @@ -42,14 +37,21 @@
"no-plusplus": "off",
"unicorn/import-style": "off",
"@typescript-eslint/no-var-requires": "off",
"no-underscore-dangle": ["error", {
"allowAfterThis": true,
"allowAfterSuper": false
}],
"no-underscore-dangle": [
"error",
{
"allowAfterThis": true,
"allowAfterSuper": false
}
],
"unicorn/no-null": "off",
"import/no-extraneous-dependencies": ["error", {
"devDependencies": true
}],
"import/no-cycle": "off"
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"import/no-cycle": "off",
"@typescript-eslint/no-explicit-any": 1
}
}
4 changes: 4 additions & 0 deletions .github/actions/checkout-and-install-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ inputs:
description: 'Whether to configure the token or SSH key with the local git config'
required: false
default: 'true'
submodules:
description: 'Whether to checkout submodules along with specified repo'
required: false
default: 'false'
runs:
using: 'composite'
steps:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ jobs:
tests:
runs-on: ubuntu-24.04
steps:
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@d6b5322d8dbc130126ec1fa00bc0f2d6cc2f53db
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@7992e39cce119c931dab92f6879013efff123009
with:
submodules: recursive
- run: npm run test
check-endpoints:
runs-on: ubuntu-24.04
# Currently, the check-endpoints script fails on the master branch.
# So we need to continue on error.
continue-on-error: true
steps:
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@d6b5322d8dbc130126ec1fa00bc0f2d6cc2f53db
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@7992e39cce119c931dab92f6879013efff123009
with:
submodules: recursive
- run: npm run check-endpoints
lint:
runs-on: ubuntu-24.04
steps:
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@d6b5322d8dbc130126ec1fa00bc0f2d6cc2f53db
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@7992e39cce119c931dab92f6879013efff123009
- run: npm run lint
build:
runs-on: ubuntu-24.04
steps:
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@d6b5322d8dbc130126ec1fa00bc0f2d6cc2f53db
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@7992e39cce119c931dab92f6879013efff123009
- run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Release
runs-on: ubuntu-24.04
steps:
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@d6b5322d8dbc130126ec1fa00bc0f2d6cc2f53db
- uses: yandex-cloud/nodejs-sdk/.github/actions/checkout-and-install-node@7992e39cce119c931dab92f6879013efff123009
with:
persist-credentials: false
- env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
node_modules
dist
.env
.vscode
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/generated/**
21 changes: 21 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
tabWidth: 4,
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
overrides: [
{
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
options: {
parser: 'typescript',
},
},
{
files: ['*.md', '*.json', '*.yaml', '*.yml'],
options: {
tabWidth: 2,
},
},
],
};
71 changes: 13 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ running in Yandex.Cloud)
### OAuth Token

```typescript
import { Session, cloudApi, serviceClients } from '@yandex-cloud/nodejs-sdk';

const { resourcemanager: { cloud_service: { ListCloudsRequest } } } = cloudApi;
import { Session } from '@yandex-cloud/nodejs-sdk';
import { cloudService } from '@yandex-cloud/nodejs-sdk/resourcemanager-v1';

// Initialize SDK with your token
const session = new Session({ oauthToken: 'YOUR_TOKEN' });

// Create service client
const cloudService = session.client(serviceClients.CloudServiceClient);
const cloudServiceClient = session.client(cloudService.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudService.list(ListCloudsRequest.fromPartial({
const response = await cloudServiceClient.list(cloudService.ListCloudsRequest.fromPartial({
pageSize: 100,
}));
```
Expand All @@ -43,37 +42,35 @@ const response = await cloudService.list(ListCloudsRequest.fromPartial({
Don't forget to assign Service Account for your Instance or Function.

```typescript
import { Session, cloudApi, serviceClients } from '@yandex-cloud/nodejs-sdk';

const { resourcemanager: { cloud_service: { ListCloudsRequest } } } = cloudApi;
import { Session} from '@yandex-cloud/nodejs-sdk';
import { cloudService } from '@yandex-cloud/nodejs-sdk/resourcemanager-v1';

// Initialize SDK with your token
const session = new Session();

// Create service client
const cloudService = session.client(serviceClients.CloudServiceClient);
const cloudServiceClient = session.client(cloudService.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudService.list(ListCloudsRequest.fromPartial({
const response = await cloudServiceClient.list(cloudService.ListCloudsRequest.fromPartial({
pageSize: 100,
}));
```

### IAM Token

```typescript
import { Session, cloudApi, serviceClients } from '@yandex-cloud/nodejs-sdk';

const { resourcemanager: { cloud_service: { ListCloudsRequest } } } = cloudApi;
import { Session } from '@yandex-cloud/nodejs-sdk';
import { cloudService } from '@yandex-cloud/nodejs-sdk/resourcemanager-v1';

// Initialize SDK with your token
const session = new Session({ iamToken: 'YOUR_TOKEN' });

// Create service client
const cloudService = session.client(serviceClients.CloudServiceClient);
const cloudServiceClient = session.client(cloudService.CloudServiceClient);

// Issue request (returns Promise)
const response = await cloudService.list(ListCloudsRequest.fromPartial({
const response = await cloudServiceClient.list(cloudService.ListCloudsRequest.fromPartial({
pageSize: 100,
}));
```
Expand All @@ -87,46 +84,4 @@ npm i
YC_OAUTH_TOKEN=... YC_FOLDER_ID=... npm run start path/to/example.ts
```

## Services

* AI Translate;
* AI Vision.
* Application Load Balancer
* Billing
* Cloud CDN
* Certificate Manager
* Compute Cloud
* Container Registry
* Data Proc
* DataSphere
* Data Transfer
* DNS
* Identity and Access Management (IAM)
* IoT Core
* Managed Service for Kubernetes
* Key Management Service (KMS)
* Load Balancer
* Lockbox
* Logging
* Managed DataBase
* ClickHouse
* ElasticSearch
* Greenplum
* Kafka
* MongoDB
* MySQL
* PostgreSQL
* Redis
* MS SQL Server
* Organization Manager
* Resource Manager
* Serverless
* Functions
* API Gateway
* Containers
* Triggers
* MDB Proxy
* Virtual Private Cloud (VPC)
* Yandex Database (YDB)

If you need generated client for other Yandex.Cloud services, just open an issue.
P.S If you need generated client for other Yandex.Cloud services, just open an issue.
2 changes: 1 addition & 1 deletion cloudapi
Submodule cloudapi updated 560 files
11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';

export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
{ ignores: ['**/generated/**', 'node_modules/**', 'examples/**'] },
...tseslint.configs.recommended,
];
2 changes: 2 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
*.png
Binary file added examples/SomeFileToSave.pdf
Binary file not shown.
21 changes: 11 additions & 10 deletions examples/ai-translate.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import { serviceClients, Session, cloudApi } from '@yandex-cloud/nodejs-sdk';
import { Session } from '@yandex-cloud/nodejs-sdk';
import { getEnv } from './utils/get-env';
import { log } from './utils/logger';

const { ai: { translate_translation_service: { TranslateRequest, TranslateRequest_Format: Format } } } = cloudApi;
import { translationService } from '@yandex-cloud/nodejs-sdk/ai-translate-v2';

const TEXTS = ['NodeJS SDK examples', 'Powerful, but easy to use library'];
const AUTH_TOKEN = getEnv('YC_OAUTH_TOKEN');
const FOLDER_ID = getEnv('YC_FOLDER_ID');

(async () => {
const session = new Session({ oauthToken: AUTH_TOKEN });
const client = session.client(serviceClients.TranslationServiceClient);
const client = session.client(translationService.TranslationServiceClient);

const response = await client.translate(TranslateRequest.fromPartial({
targetLanguageCode: 'ru',
format: Format.PLAIN_TEXT,
folderId: FOLDER_ID,
texts: TEXTS,
}));
const response = await client.translate(
translationService.TranslateRequest.fromPartial({
targetLanguageCode: 'ru',
format: translationService.TranslateRequest_Format.PLAIN_TEXT,
folderId: FOLDER_ID,
texts: TEXTS,
}),
);

for (const [idx, text] of response.translations.entries()) {
log(`translated '${TEXTS[idx]}' => '${text.text}'`);
Expand Down
Loading