@nirvana-labs/nirvana 1.20.3 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +31 -0
- package/client.d.mts +7 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -0
- package/client.d.ts.map +1 -1
- package/client.js +8 -0
- package/client.js.map +1 -1
- package/client.mjs +8 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +61 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +61 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +18 -18
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/api-keys.d.mts +16 -4
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +16 -4
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +8 -4
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +8 -4
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compute/compute.d.mts +4 -4
- package/resources/compute/compute.d.mts.map +1 -1
- package/resources/compute/compute.d.ts +4 -4
- package/resources/compute/compute.d.ts.map +1 -1
- package/resources/compute/compute.js.map +1 -1
- package/resources/compute/compute.mjs.map +1 -1
- package/resources/compute/index.d.mts +2 -2
- package/resources/compute/index.d.mts.map +1 -1
- package/resources/compute/index.d.ts +2 -2
- package/resources/compute/index.d.ts.map +1 -1
- package/resources/compute/index.js.map +1 -1
- package/resources/compute/index.mjs.map +1 -1
- package/resources/compute/vms/index.d.mts +3 -3
- package/resources/compute/vms/index.d.mts.map +1 -1
- package/resources/compute/vms/index.d.ts +3 -3
- package/resources/compute/vms/index.d.ts.map +1 -1
- package/resources/compute/vms/index.js.map +1 -1
- package/resources/compute/vms/index.mjs.map +1 -1
- package/resources/compute/vms/os-images.d.mts +11 -5
- package/resources/compute/vms/os-images.d.mts.map +1 -1
- package/resources/compute/vms/os-images.d.ts +11 -5
- package/resources/compute/vms/os-images.d.ts.map +1 -1
- package/resources/compute/vms/os-images.js +10 -3
- package/resources/compute/vms/os-images.js.map +1 -1
- package/resources/compute/vms/os-images.mjs +10 -3
- package/resources/compute/vms/os-images.mjs.map +1 -1
- package/resources/compute/vms/vms.d.mts +19 -7
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +19 -7
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/vms/vms.js +7 -3
- package/resources/compute/vms/vms.js.map +1 -1
- package/resources/compute/vms/vms.mjs +7 -3
- package/resources/compute/vms/vms.mjs.map +1 -1
- package/resources/compute/vms/volumes.d.mts +15 -5
- package/resources/compute/vms/volumes.d.mts.map +1 -1
- package/resources/compute/vms/volumes.d.ts +15 -5
- package/resources/compute/vms/volumes.d.ts.map +1 -1
- package/resources/compute/vms/volumes.js +11 -4
- package/resources/compute/vms/volumes.js.map +1 -1
- package/resources/compute/vms/volumes.mjs +11 -4
- package/resources/compute/vms/volumes.mjs.map +1 -1
- package/resources/compute/volumes/index.d.mts +1 -1
- package/resources/compute/volumes/index.d.mts.map +1 -1
- package/resources/compute/volumes/index.d.ts +1 -1
- package/resources/compute/volumes/index.d.ts.map +1 -1
- package/resources/compute/volumes/index.js.map +1 -1
- package/resources/compute/volumes/index.mjs.map +1 -1
- package/resources/compute/volumes/volumes.d.mts +14 -3
- package/resources/compute/volumes/volumes.d.mts.map +1 -1
- package/resources/compute/volumes/volumes.d.ts +14 -3
- package/resources/compute/volumes/volumes.d.ts.map +1 -1
- package/resources/compute/volumes/volumes.js +7 -3
- package/resources/compute/volumes/volumes.js.map +1 -1
- package/resources/compute/volumes/volumes.mjs +7 -3
- package/resources/compute/volumes/volumes.mjs.map +1 -1
- package/resources/networking/connect/connect.d.mts +15 -4
- package/resources/networking/connect/connect.d.mts.map +1 -1
- package/resources/networking/connect/connect.d.ts +15 -4
- package/resources/networking/connect/connect.d.ts.map +1 -1
- package/resources/networking/connect/connect.js.map +1 -1
- package/resources/networking/connect/connect.mjs +1 -1
- package/resources/networking/connect/connect.mjs.map +1 -1
- package/resources/networking/connect/connections.d.mts +11 -4
- package/resources/networking/connect/connections.d.mts.map +1 -1
- package/resources/networking/connect/connections.d.ts +11 -4
- package/resources/networking/connect/connections.d.ts.map +1 -1
- package/resources/networking/connect/connections.js +7 -4
- package/resources/networking/connect/connections.js.map +1 -1
- package/resources/networking/connect/connections.mjs +7 -4
- package/resources/networking/connect/connections.mjs.map +1 -1
- package/resources/networking/connect/index.d.mts +3 -3
- package/resources/networking/connect/index.d.mts.map +1 -1
- package/resources/networking/connect/index.d.ts +3 -3
- package/resources/networking/connect/index.d.ts.map +1 -1
- package/resources/networking/connect/index.js.map +1 -1
- package/resources/networking/connect/index.mjs +1 -1
- package/resources/networking/connect/index.mjs.map +1 -1
- package/resources/networking/connect/routes.d.mts +13 -4
- package/resources/networking/connect/routes.d.mts.map +1 -1
- package/resources/networking/connect/routes.d.ts +13 -4
- package/resources/networking/connect/routes.d.ts.map +1 -1
- package/resources/networking/connect/routes.js +10 -4
- package/resources/networking/connect/routes.js.map +1 -1
- package/resources/networking/connect/routes.mjs +10 -4
- package/resources/networking/connect/routes.mjs.map +1 -1
- package/resources/networking/firewall-rules.d.mts +16 -4
- package/resources/networking/firewall-rules.d.mts.map +1 -1
- package/resources/networking/firewall-rules.d.ts +16 -4
- package/resources/networking/firewall-rules.d.ts.map +1 -1
- package/resources/networking/firewall-rules.js +12 -4
- package/resources/networking/firewall-rules.js.map +1 -1
- package/resources/networking/firewall-rules.mjs +12 -4
- package/resources/networking/firewall-rules.mjs.map +1 -1
- package/resources/networking/index.d.mts +3 -3
- package/resources/networking/index.d.mts.map +1 -1
- package/resources/networking/index.d.ts +3 -3
- package/resources/networking/index.d.ts.map +1 -1
- package/resources/networking/index.js.map +1 -1
- package/resources/networking/index.mjs.map +1 -1
- package/resources/networking/networking.d.mts +4 -4
- package/resources/networking/networking.d.mts.map +1 -1
- package/resources/networking/networking.d.ts +4 -4
- package/resources/networking/networking.d.ts.map +1 -1
- package/resources/networking/networking.js.map +1 -1
- package/resources/networking/networking.mjs +1 -1
- package/resources/networking/networking.mjs.map +1 -1
- package/resources/networking/vpcs/index.d.mts +1 -1
- package/resources/networking/vpcs/index.d.mts.map +1 -1
- package/resources/networking/vpcs/index.d.ts +1 -1
- package/resources/networking/vpcs/index.d.ts.map +1 -1
- package/resources/networking/vpcs/index.js.map +1 -1
- package/resources/networking/vpcs/index.mjs.map +1 -1
- package/resources/networking/vpcs/vpcs.d.mts +14 -3
- package/resources/networking/vpcs/vpcs.d.mts.map +1 -1
- package/resources/networking/vpcs/vpcs.d.ts +14 -3
- package/resources/networking/vpcs/vpcs.d.ts.map +1 -1
- package/resources/networking/vpcs/vpcs.js +7 -3
- package/resources/networking/vpcs/vpcs.js.map +1 -1
- package/resources/networking/vpcs/vpcs.mjs +7 -3
- package/resources/networking/vpcs/vpcs.mjs.map +1 -1
- package/resources/operations.d.mts +11 -2
- package/resources/operations.d.mts.map +1 -1
- package/resources/operations.d.ts +11 -2
- package/resources/operations.d.ts.map +1 -1
- package/resources/operations.js +3 -2
- package/resources/operations.js.map +1 -1
- package/resources/operations.mjs +3 -2
- package/resources/operations.mjs.map +1 -1
- package/resources/rpc-nodes/dedicated/blockchains.d.mts +13 -4
- package/resources/rpc-nodes/dedicated/blockchains.d.mts.map +1 -1
- package/resources/rpc-nodes/dedicated/blockchains.d.ts +13 -4
- package/resources/rpc-nodes/dedicated/blockchains.d.ts.map +1 -1
- package/resources/rpc-nodes/dedicated/blockchains.js +7 -4
- package/resources/rpc-nodes/dedicated/blockchains.js.map +1 -1
- package/resources/rpc-nodes/dedicated/blockchains.mjs +7 -4
- package/resources/rpc-nodes/dedicated/blockchains.mjs.map +1 -1
- package/resources/rpc-nodes/dedicated/dedicated.d.mts +22 -6
- package/resources/rpc-nodes/dedicated/dedicated.d.mts.map +1 -1
- package/resources/rpc-nodes/dedicated/dedicated.d.ts +22 -6
- package/resources/rpc-nodes/dedicated/dedicated.d.ts.map +1 -1
- package/resources/rpc-nodes/dedicated/dedicated.js +7 -4
- package/resources/rpc-nodes/dedicated/dedicated.js.map +1 -1
- package/resources/rpc-nodes/dedicated/dedicated.mjs +7 -4
- package/resources/rpc-nodes/dedicated/dedicated.mjs.map +1 -1
- package/resources/rpc-nodes/dedicated/index.d.mts +2 -2
- package/resources/rpc-nodes/dedicated/index.d.mts.map +1 -1
- package/resources/rpc-nodes/dedicated/index.d.ts +2 -2
- package/resources/rpc-nodes/dedicated/index.d.ts.map +1 -1
- package/resources/rpc-nodes/dedicated/index.js.map +1 -1
- package/resources/rpc-nodes/dedicated/index.mjs.map +1 -1
- package/resources/rpc-nodes/flex/blockchains.d.mts +13 -4
- package/resources/rpc-nodes/flex/blockchains.d.mts.map +1 -1
- package/resources/rpc-nodes/flex/blockchains.d.ts +13 -4
- package/resources/rpc-nodes/flex/blockchains.d.ts.map +1 -1
- package/resources/rpc-nodes/flex/blockchains.js +10 -4
- package/resources/rpc-nodes/flex/blockchains.js.map +1 -1
- package/resources/rpc-nodes/flex/blockchains.mjs +10 -4
- package/resources/rpc-nodes/flex/blockchains.mjs.map +1 -1
- package/resources/rpc-nodes/flex/flex.d.mts +22 -5
- package/resources/rpc-nodes/flex/flex.d.mts.map +1 -1
- package/resources/rpc-nodes/flex/flex.d.ts +22 -5
- package/resources/rpc-nodes/flex/flex.d.ts.map +1 -1
- package/resources/rpc-nodes/flex/flex.js +7 -3
- package/resources/rpc-nodes/flex/flex.js.map +1 -1
- package/resources/rpc-nodes/flex/flex.mjs +7 -3
- package/resources/rpc-nodes/flex/flex.mjs.map +1 -1
- package/resources/rpc-nodes/flex/index.d.mts +2 -2
- package/resources/rpc-nodes/flex/index.d.mts.map +1 -1
- package/resources/rpc-nodes/flex/index.d.ts +2 -2
- package/resources/rpc-nodes/flex/index.d.ts.map +1 -1
- package/resources/rpc-nodes/flex/index.js.map +1 -1
- package/resources/rpc-nodes/flex/index.mjs.map +1 -1
- package/resources/rpc-nodes/index.d.mts +2 -2
- package/resources/rpc-nodes/index.d.mts.map +1 -1
- package/resources/rpc-nodes/index.d.ts +2 -2
- package/resources/rpc-nodes/index.d.ts.map +1 -1
- package/resources/rpc-nodes/index.js.map +1 -1
- package/resources/rpc-nodes/index.mjs.map +1 -1
- package/resources/rpc-nodes/rpc-nodes.d.mts +4 -4
- package/resources/rpc-nodes/rpc-nodes.d.mts.map +1 -1
- package/resources/rpc-nodes/rpc-nodes.d.ts +4 -4
- package/resources/rpc-nodes/rpc-nodes.d.ts.map +1 -1
- package/resources/rpc-nodes/rpc-nodes.js.map +1 -1
- package/resources/rpc-nodes/rpc-nodes.mjs.map +1 -1
- package/resources/shared.d.mts +8 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +8 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +25 -0
- package/src/core/pagination.ts +167 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/api-keys.ts +23 -4
- package/src/resources/compute/compute.ts +8 -0
- package/src/resources/compute/index.ts +5 -0
- package/src/resources/compute/vms/index.ts +5 -2
- package/src/resources/compute/vms/os-images.ts +18 -6
- package/src/resources/compute/vms/vms.ts +24 -7
- package/src/resources/compute/vms/volumes.ts +25 -6
- package/src/resources/compute/volumes/index.ts +2 -0
- package/src/resources/compute/volumes/volumes.ts +21 -3
- package/src/resources/networking/connect/connect.ts +24 -3
- package/src/resources/networking/connect/connections.ts +20 -4
- package/src/resources/networking/connect/index.ts +9 -2
- package/src/resources/networking/connect/routes.ts +22 -5
- package/src/resources/networking/firewall-rules.ts +27 -4
- package/src/resources/networking/index.ts +6 -0
- package/src/resources/networking/networking.ts +16 -1
- package/src/resources/networking/vpcs/index.ts +2 -0
- package/src/resources/networking/vpcs/vpcs.ts +18 -3
- package/src/resources/operations.ts +18 -2
- package/src/resources/rpc-nodes/dedicated/blockchains.ts +23 -5
- package/src/resources/rpc-nodes/dedicated/dedicated.ts +31 -6
- package/src/resources/rpc-nodes/dedicated/index.ts +4 -1
- package/src/resources/rpc-nodes/flex/blockchains.ts +22 -5
- package/src/resources/rpc-nodes/flex/flex.ts +31 -5
- package/src/resources/rpc-nodes/flex/index.ts +4 -1
- package/src/resources/rpc-nodes/index.ts +6 -0
- package/src/resources/rpc-nodes/rpc-nodes.ts +8 -0
- package/src/resources/shared.ts +11 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex.mjs","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/flex.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"flex.mjs","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/flex.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,cAAc;OACnB,EAAwB,WAAW,EAAE;OAErC,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0EzF,CAAC;IAxEC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,sBAAsB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,MAAY,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,sBAAsB,MAAM,EAAE,EAAE;YAC7D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,MAAc,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAwHD,YAAY,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Blockchains } from "./blockchains.mjs";
|
|
2
|
-
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, } from "./flex.mjs";
|
|
1
|
+
export { Blockchains, type BlockchainListParams } from "./blockchains.mjs";
|
|
2
|
+
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, type FlexListParams, type FlexBlockchainsCursor, type FlexesCursor, } from "./flex.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE;OAC1C,EACL,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,GAClB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Blockchains } from "./blockchains.js";
|
|
2
|
-
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, } from "./flex.js";
|
|
1
|
+
export { Blockchains, type BlockchainListParams } from "./blockchains.js";
|
|
2
|
+
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, type FlexListParams, type FlexBlockchainsCursor, type FlexesCursor, } from "./flex.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE;OAC1C,EACL,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,GAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAAuE;AAA9D,0GAAA,WAAW,OAAA;AACpB,kCAWgB;AAVd,oGAAA,YAAY,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/rpc-nodes/flex/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAA6B;OAC1C,EACL,YAAY,GAUb"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DedicatedResource, type Dedicated, type DedicatedBlockchain, type DedicatedBlockchainList, type DedicatedList, } from "./dedicated/index.mjs";
|
|
2
|
-
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, } from "./flex/index.mjs";
|
|
1
|
+
export { DedicatedResource, type Dedicated, type DedicatedBlockchain, type DedicatedBlockchainList, type DedicatedList, type DedicatedListParams, type DedicatedBlockchainsCursor, type DedicatedsCursor, } from "./dedicated/index.mjs";
|
|
2
|
+
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, type FlexListParams, type FlexBlockchainsCursor, type FlexesCursor, } from "./flex/index.mjs";
|
|
3
3
|
export { RPCNodes } from "./rpc-nodes.mjs";
|
|
4
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":"OAEO,EACL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":"OAEO,EACL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,GACtB;OACM,EACL,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,GAClB;OACM,EAAE,QAAQ,EAAE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DedicatedResource, type Dedicated, type DedicatedBlockchain, type DedicatedBlockchainList, type DedicatedList, } from "./dedicated/index.js";
|
|
2
|
-
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, } from "./flex/index.js";
|
|
1
|
+
export { DedicatedResource, type Dedicated, type DedicatedBlockchain, type DedicatedBlockchainList, type DedicatedList, type DedicatedListParams, type DedicatedBlockchainsCursor, type DedicatedsCursor, } from "./dedicated/index.js";
|
|
2
|
+
export { FlexResource, type Flex, type FlexBlockchain, type FlexBlockchainList, type FlexList, type FlexCreateParams, type FlexUpdateParams, type FlexListParams, type FlexBlockchainsCursor, type FlexesCursor, } from "./flex/index.js";
|
|
3
3
|
export { RPCNodes } from "./rpc-nodes.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":"OAEO,EACL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":"OAEO,EACL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,GACtB;OACM,EACL,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,GAClB;OACM,EAAE,QAAQ,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAS2B;AARzB,0GAAA,iBAAiB,OAAA;AASnB,yCAWsB;AAVpB,qGAAA,YAAY,OAAA;AAWd,4CAAuC;AAA9B,qGAAA,QAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/rpc-nodes/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,iBAAiB,GAQlB;OACM,EACL,YAAY,GAUb;OACM,EAAE,QAAQ,EAAE"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as DedicatedAPI from "./dedicated/dedicated.mjs";
|
|
3
|
-
import { Dedicated, DedicatedBlockchain, DedicatedBlockchainList, DedicatedList, DedicatedResource } from "./dedicated/dedicated.mjs";
|
|
3
|
+
import { Dedicated, DedicatedBlockchain, DedicatedBlockchainList, DedicatedList, DedicatedListParams, DedicatedResource, DedicatedsCursor } from "./dedicated/dedicated.mjs";
|
|
4
4
|
import * as FlexAPI from "./flex/flex.mjs";
|
|
5
|
-
import { Flex, FlexBlockchain, FlexBlockchainList, FlexCreateParams, FlexList, FlexResource, FlexUpdateParams } from "./flex/flex.mjs";
|
|
5
|
+
import { Flex, FlexBlockchain, FlexBlockchainList, FlexCreateParams, FlexList, FlexListParams, FlexResource, FlexUpdateParams, FlexesCursor } from "./flex/flex.mjs";
|
|
6
6
|
export declare class RPCNodes extends APIResource {
|
|
7
7
|
flex: FlexAPI.FlexResource;
|
|
8
8
|
dedicated: DedicatedAPI.DedicatedResource;
|
|
9
9
|
}
|
|
10
10
|
export declare namespace RPCNodes {
|
|
11
|
-
export { FlexResource as FlexResource, type Flex as Flex, type FlexBlockchain as FlexBlockchain, type FlexBlockchainList as FlexBlockchainList, type FlexList as FlexList, type FlexCreateParams as FlexCreateParams, type FlexUpdateParams as FlexUpdateParams, };
|
|
12
|
-
export { DedicatedResource as DedicatedResource, type Dedicated as Dedicated, type DedicatedBlockchain as DedicatedBlockchain, type DedicatedBlockchainList as DedicatedBlockchainList, type DedicatedList as DedicatedList, };
|
|
11
|
+
export { FlexResource as FlexResource, type Flex as Flex, type FlexBlockchain as FlexBlockchain, type FlexBlockchainList as FlexBlockchainList, type FlexList as FlexList, type FlexesCursor as FlexesCursor, type FlexCreateParams as FlexCreateParams, type FlexUpdateParams as FlexUpdateParams, type FlexListParams as FlexListParams, };
|
|
12
|
+
export { DedicatedResource as DedicatedResource, type Dedicated as Dedicated, type DedicatedBlockchain as DedicatedBlockchain, type DedicatedBlockchainList as DedicatedBlockchainList, type DedicatedList as DedicatedList, type DedicatedsCursor as DedicatedsCursor, type DedicatedListParams as DedicatedListParams, };
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=rpc-nodes.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-nodes.d.mts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,iBAAiB,
|
|
1
|
+
{"version":3,"file":"rpc-nodes.d.mts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EACjB;OACM,KAAK,OAAO;OACZ,EACL,IAAI,EACJ,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,IAAI,EAAE,OAAO,CAAC,YAAY,CAA0C;IACpE,SAAS,EAAE,YAAY,CAAC,iBAAiB,CAAoD;CAC9F;AAKD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,iBAAiB,IAAI,iBAAiB,EACtC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as DedicatedAPI from "./dedicated/dedicated.js";
|
|
3
|
-
import { Dedicated, DedicatedBlockchain, DedicatedBlockchainList, DedicatedList, DedicatedResource } from "./dedicated/dedicated.js";
|
|
3
|
+
import { Dedicated, DedicatedBlockchain, DedicatedBlockchainList, DedicatedList, DedicatedListParams, DedicatedResource, DedicatedsCursor } from "./dedicated/dedicated.js";
|
|
4
4
|
import * as FlexAPI from "./flex/flex.js";
|
|
5
|
-
import { Flex, FlexBlockchain, FlexBlockchainList, FlexCreateParams, FlexList, FlexResource, FlexUpdateParams } from "./flex/flex.js";
|
|
5
|
+
import { Flex, FlexBlockchain, FlexBlockchainList, FlexCreateParams, FlexList, FlexListParams, FlexResource, FlexUpdateParams, FlexesCursor } from "./flex/flex.js";
|
|
6
6
|
export declare class RPCNodes extends APIResource {
|
|
7
7
|
flex: FlexAPI.FlexResource;
|
|
8
8
|
dedicated: DedicatedAPI.DedicatedResource;
|
|
9
9
|
}
|
|
10
10
|
export declare namespace RPCNodes {
|
|
11
|
-
export { FlexResource as FlexResource, type Flex as Flex, type FlexBlockchain as FlexBlockchain, type FlexBlockchainList as FlexBlockchainList, type FlexList as FlexList, type FlexCreateParams as FlexCreateParams, type FlexUpdateParams as FlexUpdateParams, };
|
|
12
|
-
export { DedicatedResource as DedicatedResource, type Dedicated as Dedicated, type DedicatedBlockchain as DedicatedBlockchain, type DedicatedBlockchainList as DedicatedBlockchainList, type DedicatedList as DedicatedList, };
|
|
11
|
+
export { FlexResource as FlexResource, type Flex as Flex, type FlexBlockchain as FlexBlockchain, type FlexBlockchainList as FlexBlockchainList, type FlexList as FlexList, type FlexesCursor as FlexesCursor, type FlexCreateParams as FlexCreateParams, type FlexUpdateParams as FlexUpdateParams, type FlexListParams as FlexListParams, };
|
|
12
|
+
export { DedicatedResource as DedicatedResource, type Dedicated as Dedicated, type DedicatedBlockchain as DedicatedBlockchain, type DedicatedBlockchainList as DedicatedBlockchainList, type DedicatedList as DedicatedList, type DedicatedsCursor as DedicatedsCursor, type DedicatedListParams as DedicatedListParams, };
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=rpc-nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-nodes.d.ts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,iBAAiB,
|
|
1
|
+
{"version":3,"file":"rpc-nodes.d.ts","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EACjB;OACM,KAAK,OAAO;OACZ,EACL,IAAI,EACJ,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,IAAI,EAAE,OAAO,CAAC,YAAY,CAA0C;IACpE,SAAS,EAAE,YAAY,CAAC,iBAAiB,CAAoD;CAC9F;AAKD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,iBAAiB,IAAI,iBAAiB,EACtC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-nodes.js","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+EAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"rpc-nodes.js","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+EAAsD;AACtD,wDAQ+B;AAC/B,gEAAuC;AACvC,yCAUqB;AAErB,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,SAAI,GAAyB,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpE,cAAS,GAAmC,IAAI,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/F,CAAC;CAAA;AAHD,4BAGC;AAED,QAAQ,CAAC,YAAY,GAAG,mBAAY,CAAC;AACrC,QAAQ,CAAC,iBAAiB,GAAG,6BAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-nodes.mjs","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,
|
|
1
|
+
{"version":3,"file":"rpc-nodes.mjs","sourceRoot":"","sources":["../../src/resources/rpc-nodes/rpc-nodes.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAML,iBAAiB,GAElB;OACM,KAAK,OAAO;OACZ,EAOL,YAAY,GAGb;AAED,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,SAAI,GAAyB,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpE,cAAS,GAAmC,IAAI,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/F,CAAC;CAAA;AAED,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC;AACrC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC"}
|
package/resources/shared.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -13,6 +13,8 @@ import * as Shims from './internal/shims';
|
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
14
|
import { VERSION } from './version';
|
|
15
15
|
import * as Errors from './core/error';
|
|
16
|
+
import * as Pagination from './core/pagination';
|
|
17
|
+
import { AbstractPage, type CursorParams, CursorResponse } from './core/pagination';
|
|
16
18
|
import * as Uploads from './core/uploads';
|
|
17
19
|
import * as API from './resources/index';
|
|
18
20
|
import { APIPromise } from './core/api-promise';
|
|
@@ -488,6 +490,25 @@ export class NirvanaLabs {
|
|
|
488
490
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
489
491
|
}
|
|
490
492
|
|
|
493
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(
|
|
494
|
+
path: string,
|
|
495
|
+
Page: new (...args: any[]) => PageClass,
|
|
496
|
+
opts?: RequestOptions,
|
|
497
|
+
): Pagination.PagePromise<PageClass, Item> {
|
|
498
|
+
return this.requestAPIList(Page, { method: 'get', path, ...opts });
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
requestAPIList<
|
|
502
|
+
Item = unknown,
|
|
503
|
+
PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>,
|
|
504
|
+
>(
|
|
505
|
+
Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass,
|
|
506
|
+
options: FinalRequestOptions,
|
|
507
|
+
): Pagination.PagePromise<PageClass, Item> {
|
|
508
|
+
const request = this.makeRequest(options, null, undefined);
|
|
509
|
+
return new Pagination.PagePromise<PageClass, Item>(this as any as NirvanaLabs, request, Page);
|
|
510
|
+
}
|
|
511
|
+
|
|
491
512
|
async fetchWithTimeout(
|
|
492
513
|
url: RequestInfo,
|
|
493
514
|
init: RequestInit | undefined,
|
|
@@ -740,6 +761,9 @@ NirvanaLabs.Vektor = Vektor;
|
|
|
740
761
|
export declare namespace NirvanaLabs {
|
|
741
762
|
export type RequestOptions = Opts.RequestOptions;
|
|
742
763
|
|
|
764
|
+
export import Cursor = Pagination.Cursor;
|
|
765
|
+
export { type CursorParams as CursorParams, type CursorResponse as CursorResponse };
|
|
766
|
+
|
|
743
767
|
export { UserResource as UserResource };
|
|
744
768
|
|
|
745
769
|
export { APIKeys as APIKeys };
|
|
@@ -754,6 +778,7 @@ export declare namespace NirvanaLabs {
|
|
|
754
778
|
|
|
755
779
|
export { Vektor as Vektor };
|
|
756
780
|
|
|
781
|
+
export type Pagination = API.Pagination;
|
|
757
782
|
export type RegionName = API.RegionName;
|
|
758
783
|
export type ResourceStatus = API.ResourceStatus;
|
|
759
784
|
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { NirvanaLabsError } from './error';
|
|
4
|
+
import { FinalRequestOptions } from '../internal/request-options';
|
|
5
|
+
import { defaultParseResponse } from '../internal/parse';
|
|
6
|
+
import { type NirvanaLabs } from '../client';
|
|
7
|
+
import { APIPromise } from './api-promise';
|
|
8
|
+
import { type APIResponseProps } from '../internal/parse';
|
|
9
|
+
import { maybeObj } from '../internal/utils/values';
|
|
10
|
+
|
|
11
|
+
export type PageRequestOptions = Pick<FinalRequestOptions, 'query' | 'headers' | 'body' | 'path' | 'method'>;
|
|
12
|
+
|
|
13
|
+
export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
14
|
+
#client: NirvanaLabs;
|
|
15
|
+
protected options: FinalRequestOptions;
|
|
16
|
+
|
|
17
|
+
protected response: Response;
|
|
18
|
+
protected body: unknown;
|
|
19
|
+
|
|
20
|
+
constructor(client: NirvanaLabs, response: Response, body: unknown, options: FinalRequestOptions) {
|
|
21
|
+
this.#client = client;
|
|
22
|
+
this.options = options;
|
|
23
|
+
this.response = response;
|
|
24
|
+
this.body = body;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
abstract nextPageRequestOptions(): PageRequestOptions | null;
|
|
28
|
+
|
|
29
|
+
abstract getPaginatedItems(): Item[];
|
|
30
|
+
|
|
31
|
+
hasNextPage(): boolean {
|
|
32
|
+
const items = this.getPaginatedItems();
|
|
33
|
+
if (!items.length) return false;
|
|
34
|
+
return this.nextPageRequestOptions() != null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async getNextPage(): Promise<this> {
|
|
38
|
+
const nextOptions = this.nextPageRequestOptions();
|
|
39
|
+
if (!nextOptions) {
|
|
40
|
+
throw new NirvanaLabsError(
|
|
41
|
+
'No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.',
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return await this.#client.requestAPIList(this.constructor as any, nextOptions);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async *iterPages(): AsyncGenerator<this> {
|
|
49
|
+
let page: this = this;
|
|
50
|
+
yield page;
|
|
51
|
+
while (page.hasNextPage()) {
|
|
52
|
+
page = await page.getNextPage();
|
|
53
|
+
yield page;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
|
|
58
|
+
for await (const page of this.iterPages()) {
|
|
59
|
+
for (const item of page.getPaginatedItems()) {
|
|
60
|
+
yield item;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* This subclass of Promise will resolve to an instantiated Page once the request completes.
|
|
68
|
+
*
|
|
69
|
+
* It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg:
|
|
70
|
+
*
|
|
71
|
+
* for await (const item of client.items.list()) {
|
|
72
|
+
* console.log(item)
|
|
73
|
+
* }
|
|
74
|
+
*/
|
|
75
|
+
export class PagePromise<
|
|
76
|
+
PageClass extends AbstractPage<Item>,
|
|
77
|
+
Item = ReturnType<PageClass['getPaginatedItems']>[number],
|
|
78
|
+
>
|
|
79
|
+
extends APIPromise<PageClass>
|
|
80
|
+
implements AsyncIterable<Item>
|
|
81
|
+
{
|
|
82
|
+
constructor(
|
|
83
|
+
client: NirvanaLabs,
|
|
84
|
+
request: Promise<APIResponseProps>,
|
|
85
|
+
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
86
|
+
) {
|
|
87
|
+
super(
|
|
88
|
+
client,
|
|
89
|
+
request,
|
|
90
|
+
async (client, props) =>
|
|
91
|
+
new Page(client, props.response, await defaultParseResponse(client, props), props.options),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Allow auto-paginating iteration on an unawaited list call, eg:
|
|
97
|
+
*
|
|
98
|
+
* for await (const item of client.items.list()) {
|
|
99
|
+
* console.log(item)
|
|
100
|
+
* }
|
|
101
|
+
*/
|
|
102
|
+
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
|
|
103
|
+
const page = await this;
|
|
104
|
+
for await (const item of page) {
|
|
105
|
+
yield item;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface CursorResponse<Item> {
|
|
111
|
+
items: Array<Item>;
|
|
112
|
+
|
|
113
|
+
pagination: CursorResponse.Pagination | null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export namespace CursorResponse {
|
|
117
|
+
export interface Pagination {
|
|
118
|
+
next_cursor?: string | null;
|
|
119
|
+
|
|
120
|
+
previous_cursor?: string | null;
|
|
121
|
+
|
|
122
|
+
total_count?: number;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface CursorParams {
|
|
127
|
+
cursor?: string;
|
|
128
|
+
|
|
129
|
+
limit?: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export class Cursor<Item> extends AbstractPage<Item> implements CursorResponse<Item> {
|
|
133
|
+
items: Array<Item>;
|
|
134
|
+
|
|
135
|
+
pagination: CursorResponse.Pagination | null;
|
|
136
|
+
|
|
137
|
+
constructor(
|
|
138
|
+
client: NirvanaLabs,
|
|
139
|
+
response: Response,
|
|
140
|
+
body: CursorResponse<Item>,
|
|
141
|
+
options: FinalRequestOptions,
|
|
142
|
+
) {
|
|
143
|
+
super(client, response, body, options);
|
|
144
|
+
|
|
145
|
+
this.items = body.items || [];
|
|
146
|
+
this.pagination = body.pagination || null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
getPaginatedItems(): Item[] {
|
|
150
|
+
return this.items ?? [];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
nextPageRequestOptions(): PageRequestOptions | null {
|
|
154
|
+
const cursor = this.pagination?.next_cursor;
|
|
155
|
+
if (!cursor) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
...this.options,
|
|
161
|
+
query: {
|
|
162
|
+
...maybeObj(this.options.query),
|
|
163
|
+
cursor,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { NirvanaLabs as default } from './client';
|
|
|
5
5
|
export { type Uploadable, toFile } from './core/uploads';
|
|
6
6
|
export { APIPromise } from './core/api-promise';
|
|
7
7
|
export { NirvanaLabs, type ClientOptions } from './client';
|
|
8
|
+
export { PagePromise } from './core/pagination';
|
|
8
9
|
export {
|
|
9
10
|
NirvanaLabsError,
|
|
10
11
|
APIError,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as Shared from './shared';
|
|
4
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
|
|
5
7
|
import { buildHeaders } from '../internal/headers';
|
|
6
8
|
import { RequestOptions } from '../internal/request-options';
|
|
7
9
|
import { path } from '../internal/utils/path';
|
|
@@ -14,7 +16,7 @@ export class APIKeys extends APIResource {
|
|
|
14
16
|
* ```ts
|
|
15
17
|
* const apiKey = await client.apiKeys.create({
|
|
16
18
|
* expires_at: '2025-12-31T23:59:59Z',
|
|
17
|
-
* name: '
|
|
19
|
+
* name: 'My API Key',
|
|
18
20
|
* });
|
|
19
21
|
* ```
|
|
20
22
|
*/
|
|
@@ -39,11 +41,17 @@ export class APIKeys extends APIResource {
|
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
41
43
|
* ```ts
|
|
42
|
-
*
|
|
44
|
+
* // Automatically fetches more pages as needed.
|
|
45
|
+
* for await (const apiKey of client.apiKeys.list()) {
|
|
46
|
+
* // ...
|
|
47
|
+
* }
|
|
43
48
|
* ```
|
|
44
49
|
*/
|
|
45
|
-
list(
|
|
46
|
-
|
|
50
|
+
list(
|
|
51
|
+
query: APIKeyListParams | null | undefined = {},
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): PagePromise<APIKeysCursor, APIKey> {
|
|
54
|
+
return this._client.getAPIList('/v1/api_keys', Cursor<APIKey>, { query, ...options });
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
/**
|
|
@@ -74,6 +82,8 @@ export class APIKeys extends APIResource {
|
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
|
|
85
|
+
export type APIKeysCursor = Cursor<APIKey>;
|
|
86
|
+
|
|
77
87
|
/**
|
|
78
88
|
* API Key response.
|
|
79
89
|
*/
|
|
@@ -126,6 +136,11 @@ export interface APIKey {
|
|
|
126
136
|
|
|
127
137
|
export interface APIKeyList {
|
|
128
138
|
items: Array<APIKey>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Pagination response details.
|
|
142
|
+
*/
|
|
143
|
+
pagination: Shared.Pagination;
|
|
129
144
|
}
|
|
130
145
|
|
|
131
146
|
export interface APIKeyCreateParams {
|
|
@@ -162,11 +177,15 @@ export interface APIKeyUpdateParams {
|
|
|
162
177
|
tags?: Array<string>;
|
|
163
178
|
}
|
|
164
179
|
|
|
180
|
+
export interface APIKeyListParams extends CursorParams {}
|
|
181
|
+
|
|
165
182
|
export declare namespace APIKeys {
|
|
166
183
|
export {
|
|
167
184
|
type APIKey as APIKey,
|
|
168
185
|
type APIKeyList as APIKeyList,
|
|
186
|
+
type APIKeysCursor as APIKeysCursor,
|
|
169
187
|
type APIKeyCreateParams as APIKeyCreateParams,
|
|
170
188
|
type APIKeyUpdateParams as APIKeyUpdateParams,
|
|
189
|
+
type APIKeyListParams as APIKeyListParams,
|
|
171
190
|
};
|
|
172
191
|
}
|
|
@@ -12,8 +12,10 @@ import {
|
|
|
12
12
|
VM,
|
|
13
13
|
VMCreateParams,
|
|
14
14
|
VMList,
|
|
15
|
+
VMListParams,
|
|
15
16
|
VMUpdateParams,
|
|
16
17
|
VMs,
|
|
18
|
+
VMsCursor,
|
|
17
19
|
} from './vms/vms';
|
|
18
20
|
import * as VolumesAPI from './volumes/volumes';
|
|
19
21
|
import {
|
|
@@ -22,8 +24,10 @@ import {
|
|
|
22
24
|
VolumeCreateParams,
|
|
23
25
|
VolumeKind,
|
|
24
26
|
VolumeList,
|
|
27
|
+
VolumeListParams,
|
|
25
28
|
VolumeUpdateParams,
|
|
26
29
|
Volumes,
|
|
30
|
+
VolumesCursor,
|
|
27
31
|
} from './volumes/volumes';
|
|
28
32
|
|
|
29
33
|
export class Compute extends APIResource {
|
|
@@ -45,8 +49,10 @@ export declare namespace Compute {
|
|
|
45
49
|
type SSHKeyRequest as SSHKeyRequest,
|
|
46
50
|
type VM as VM,
|
|
47
51
|
type VMList as VMList,
|
|
52
|
+
type VMsCursor as VMsCursor,
|
|
48
53
|
type VMCreateParams as VMCreateParams,
|
|
49
54
|
type VMUpdateParams as VMUpdateParams,
|
|
55
|
+
type VMListParams as VMListParams,
|
|
50
56
|
};
|
|
51
57
|
|
|
52
58
|
export {
|
|
@@ -55,7 +61,9 @@ export declare namespace Compute {
|
|
|
55
61
|
type Volume as Volume,
|
|
56
62
|
type VolumeKind as VolumeKind,
|
|
57
63
|
type VolumeList as VolumeList,
|
|
64
|
+
type VolumesCursor as VolumesCursor,
|
|
58
65
|
type VolumeCreateParams as VolumeCreateParams,
|
|
59
66
|
type VolumeUpdateParams as VolumeUpdateParams,
|
|
67
|
+
type VolumeListParams as VolumeListParams,
|
|
60
68
|
};
|
|
61
69
|
}
|
|
@@ -13,6 +13,9 @@ export {
|
|
|
13
13
|
type VMList,
|
|
14
14
|
type VMCreateParams,
|
|
15
15
|
type VMUpdateParams,
|
|
16
|
+
type VMListParams,
|
|
17
|
+
type OSImagesCursor,
|
|
18
|
+
type VMsCursor,
|
|
16
19
|
} from './vms/index';
|
|
17
20
|
export {
|
|
18
21
|
Volumes,
|
|
@@ -22,4 +25,6 @@ export {
|
|
|
22
25
|
type VolumeList,
|
|
23
26
|
type VolumeCreateParams,
|
|
24
27
|
type VolumeUpdateParams,
|
|
28
|
+
type VolumeListParams,
|
|
29
|
+
type VolumesCursor,
|
|
25
30
|
} from './volumes/index';
|
|
@@ -7,7 +7,7 @@ export {
|
|
|
7
7
|
type AvailabilityCreateParams,
|
|
8
8
|
type AvailabilityUpdateParams,
|
|
9
9
|
} from './availability';
|
|
10
|
-
export { OSImages, type
|
|
10
|
+
export { OSImages, type OSImageListParams } from './os-images';
|
|
11
11
|
export {
|
|
12
12
|
VMs,
|
|
13
13
|
type CPUConfig,
|
|
@@ -20,5 +20,8 @@ export {
|
|
|
20
20
|
type VMList,
|
|
21
21
|
type VMCreateParams,
|
|
22
22
|
type VMUpdateParams,
|
|
23
|
+
type VMListParams,
|
|
24
|
+
type OSImagesCursor,
|
|
25
|
+
type VMsCursor,
|
|
23
26
|
} from './vms';
|
|
24
|
-
export { Volumes } from './volumes';
|
|
27
|
+
export { Volumes, type VolumeListParams } from './volumes';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as VMsAPI from './vms';
|
|
5
|
-
import {
|
|
5
|
+
import { OSImagesCursor } from './vms';
|
|
6
|
+
import { Cursor, type CursorParams, PagePromise } from '../../../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
8
|
|
|
8
9
|
export class OSImages extends APIResource {
|
|
@@ -11,16 +12,27 @@ export class OSImages extends APIResource {
|
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```ts
|
|
14
|
-
*
|
|
15
|
+
* // Automatically fetches more pages as needed.
|
|
16
|
+
* for await (const osImage of client.compute.vms.osImages.list()) {
|
|
17
|
+
* // ...
|
|
18
|
+
* }
|
|
15
19
|
* ```
|
|
16
20
|
*/
|
|
17
|
-
list(
|
|
18
|
-
|
|
21
|
+
list(
|
|
22
|
+
query: OSImageListParams | null | undefined = {},
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): PagePromise<OSImagesCursor, VMsAPI.OSImage> {
|
|
25
|
+
return this._client.getAPIList('/v1/compute/vms/os_images', Cursor<VMsAPI.OSImage>, {
|
|
26
|
+
query,
|
|
27
|
+
...options,
|
|
28
|
+
});
|
|
19
29
|
}
|
|
20
30
|
}
|
|
21
31
|
|
|
22
|
-
export
|
|
32
|
+
export interface OSImageListParams extends CursorParams {}
|
|
23
33
|
|
|
24
34
|
export declare namespace OSImages {
|
|
25
|
-
export { type
|
|
35
|
+
export { type OSImageListParams as OSImageListParams };
|
|
26
36
|
}
|
|
37
|
+
|
|
38
|
+
export { type OSImagesCursor };
|