@metal-stack/api 0.4.4 → 0.5.2

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.
Files changed (151) hide show
  1. package/{js/Makefile → Makefile} +5 -2
  2. package/bun.lock +74 -0
  3. package/client-test.d.ts +1 -0
  4. package/client-test.js +45 -0
  5. package/client-test.ts +49 -0
  6. package/client.d.ts +97 -0
  7. package/client.js +347 -0
  8. package/client.ts +662 -0
  9. package/{js/metalstack → metalstack}/admin/v2/audit_pb.d.ts +5 -5
  10. package/{js/metalstack → metalstack}/admin/v2/audit_pb.ts +5 -5
  11. package/{js/metalstack → metalstack}/admin/v2/component_pb.d.ts +6 -6
  12. package/{js/metalstack → metalstack}/admin/v2/component_pb.ts +6 -6
  13. package/{js/metalstack → metalstack}/admin/v2/filesystem_pb.d.ts +28 -28
  14. package/{js/metalstack → metalstack}/admin/v2/filesystem_pb.ts +28 -28
  15. package/{js/metalstack → metalstack}/admin/v2/image_pb.d.ts +16 -16
  16. package/{js/metalstack → metalstack}/admin/v2/image_pb.ts +16 -16
  17. package/{js/metalstack → metalstack}/admin/v2/ip_pb.d.ts +2 -2
  18. package/{js/metalstack → metalstack}/admin/v2/ip_pb.ts +2 -2
  19. package/{js/metalstack → metalstack}/admin/v2/machine_pb.d.ts +47 -55
  20. package/{js/metalstack → metalstack}/admin/v2/machine_pb.js +1 -1
  21. package/{js/metalstack → metalstack}/admin/v2/machine_pb.ts +48 -55
  22. package/{js/metalstack → metalstack}/admin/v2/network_pb.d.ts +195 -37
  23. package/{js/metalstack → metalstack}/admin/v2/network_pb.js +36 -5
  24. package/{js/metalstack → metalstack}/admin/v2/network_pb.ts +222 -42
  25. package/{js/metalstack → metalstack}/admin/v2/partition_pb.d.ts +26 -26
  26. package/{js/metalstack → metalstack}/admin/v2/partition_pb.ts +26 -26
  27. package/{js/metalstack → metalstack}/admin/v2/project_pb.d.ts +2 -2
  28. package/{js/metalstack → metalstack}/admin/v2/project_pb.ts +2 -2
  29. package/{js/metalstack → metalstack}/admin/v2/size_imageconstraint_pb.d.ts +18 -18
  30. package/{js/metalstack → metalstack}/admin/v2/size_imageconstraint_pb.ts +18 -18
  31. package/{js/metalstack → metalstack}/admin/v2/size_pb.d.ts +11 -11
  32. package/{js/metalstack → metalstack}/admin/v2/size_pb.ts +11 -11
  33. package/{js/metalstack → metalstack}/admin/v2/size_reservation_pb.d.ts +14 -14
  34. package/{js/metalstack → metalstack}/admin/v2/size_reservation_pb.ts +14 -14
  35. package/{js/metalstack → metalstack}/admin/v2/switch_pb.d.ts +29 -29
  36. package/{js/metalstack → metalstack}/admin/v2/switch_pb.ts +29 -29
  37. package/{js/metalstack → metalstack}/admin/v2/task_pb.d.ts +47 -47
  38. package/{js/metalstack → metalstack}/admin/v2/task_pb.js +8 -8
  39. package/{js/metalstack → metalstack}/admin/v2/task_pb.ts +47 -47
  40. package/{js/metalstack → metalstack}/admin/v2/tenant_pb.d.ts +22 -22
  41. package/{js/metalstack → metalstack}/admin/v2/tenant_pb.ts +22 -22
  42. package/{js/metalstack → metalstack}/admin/v2/token_pb.d.ts +8 -8
  43. package/{js/metalstack → metalstack}/admin/v2/token_pb.ts +8 -8
  44. package/{js/metalstack → metalstack}/admin/v2/vpn_pb.d.ts +13 -13
  45. package/{js/metalstack → metalstack}/admin/v2/vpn_pb.ts +13 -13
  46. package/{js/metalstack → metalstack}/api/v2/audit_pb.d.ts +37 -37
  47. package/{js/metalstack → metalstack}/api/v2/audit_pb.js +3 -3
  48. package/{js/metalstack → metalstack}/api/v2/audit_pb.ts +37 -37
  49. package/{js/metalstack → metalstack}/api/v2/common_pb.d.ts +68 -68
  50. package/{js/metalstack → metalstack}/api/v2/common_pb.js +47 -47
  51. package/{js/metalstack → metalstack}/api/v2/common_pb.ts +68 -68
  52. package/{js/metalstack → metalstack}/api/v2/component_pb.d.ts +17 -17
  53. package/{js/metalstack → metalstack}/api/v2/component_pb.js +8 -8
  54. package/{js/metalstack → metalstack}/api/v2/component_pb.ts +17 -17
  55. package/{js/metalstack → metalstack}/api/v2/filesystem_pb.d.ts +82 -82
  56. package/{js/metalstack → metalstack}/api/v2/filesystem_pb.js +23 -23
  57. package/{js/metalstack → metalstack}/api/v2/filesystem_pb.ts +82 -82
  58. package/{js/metalstack → metalstack}/api/v2/health_pb.d.ts +21 -21
  59. package/{js/metalstack → metalstack}/api/v2/health_pb.js +13 -13
  60. package/{js/metalstack → metalstack}/api/v2/health_pb.ts +21 -21
  61. package/{js/metalstack → metalstack}/api/v2/image_pb.d.ts +45 -45
  62. package/{js/metalstack → metalstack}/api/v2/image_pb.js +9 -9
  63. package/{js/metalstack → metalstack}/api/v2/image_pb.ts +45 -45
  64. package/{js/metalstack → metalstack}/api/v2/ip_pb.d.ts +67 -67
  65. package/{js/metalstack → metalstack}/api/v2/ip_pb.js +8 -8
  66. package/{js/metalstack → metalstack}/api/v2/ip_pb.ts +67 -67
  67. package/{js/metalstack → metalstack}/api/v2/machine_pb.d.ts +422 -374
  68. package/{js/metalstack → metalstack}/api/v2/machine_pb.js +94 -89
  69. package/{js/metalstack → metalstack}/api/v2/machine_pb.ts +453 -396
  70. package/{js/metalstack → metalstack}/api/v2/method_pb.d.ts +7 -7
  71. package/{js/metalstack → metalstack}/api/v2/method_pb.ts +7 -7
  72. package/{js/metalstack → metalstack}/api/v2/network_pb.d.ts +146 -98
  73. package/{js/metalstack → metalstack}/api/v2/network_pb.js +30 -20
  74. package/{js/metalstack → metalstack}/api/v2/network_pb.ts +158 -102
  75. package/{js/metalstack → metalstack}/api/v2/partition_pb.d.ts +28 -28
  76. package/{js/metalstack → metalstack}/api/v2/partition_pb.ts +28 -28
  77. package/{js/metalstack → metalstack}/api/v2/predefined_rules_pb.d.ts +30 -24
  78. package/{js/metalstack → metalstack}/api/v2/predefined_rules_pb.js +40 -34
  79. package/{js/metalstack → metalstack}/api/v2/predefined_rules_pb.ts +42 -34
  80. package/{js/metalstack → metalstack}/api/v2/project_pb.d.ts +114 -114
  81. package/{js/metalstack → metalstack}/api/v2/project_pb.ts +114 -114
  82. package/{js/metalstack → metalstack}/api/v2/size_imageconstraint_pb.d.ts +21 -22
  83. package/{js/metalstack → metalstack}/api/v2/size_imageconstraint_pb.ts +21 -22
  84. package/{js/metalstack → metalstack}/api/v2/size_pb.d.ts +29 -29
  85. package/{js/metalstack → metalstack}/api/v2/size_pb.js +6 -6
  86. package/{js/metalstack → metalstack}/api/v2/size_pb.ts +29 -29
  87. package/{js/metalstack → metalstack}/api/v2/size_reservation_pb.d.ts +27 -27
  88. package/{js/metalstack → metalstack}/api/v2/size_reservation_pb.ts +27 -27
  89. package/{js/metalstack → metalstack}/api/v2/switch_pb.d.ts +8 -8
  90. package/{js/metalstack → metalstack}/api/v2/switch_pb.js +1 -1
  91. package/{js/metalstack → metalstack}/api/v2/switch_pb.ts +9 -9
  92. package/{js/metalstack → metalstack}/api/v2/tenant_pb.d.ts +114 -116
  93. package/{js/metalstack → metalstack}/api/v2/tenant_pb.ts +114 -116
  94. package/{js/metalstack → metalstack}/api/v2/token_pb.d.ts +103 -103
  95. package/{js/metalstack → metalstack}/api/v2/token_pb.js +3 -3
  96. package/{js/metalstack → metalstack}/api/v2/token_pb.ts +103 -103
  97. package/{js/metalstack → metalstack}/api/v2/user_pb.d.ts +8 -8
  98. package/{js/metalstack → metalstack}/api/v2/user_pb.ts +8 -8
  99. package/{js/metalstack → metalstack}/api/v2/version_pb.d.ts +5 -5
  100. package/{js/metalstack → metalstack}/api/v2/version_pb.ts +5 -5
  101. package/{js/metalstack → metalstack}/api/v2/vpn_pb.d.ts +6 -6
  102. package/{js/metalstack → metalstack}/api/v2/vpn_pb.ts +6 -6
  103. package/{js/metalstack → metalstack}/infra/v2/bmc_pb.d.ts +15 -17
  104. package/{js/metalstack → metalstack}/infra/v2/bmc_pb.js +1 -1
  105. package/{js/metalstack → metalstack}/infra/v2/bmc_pb.ts +16 -16
  106. package/{js/metalstack → metalstack}/infra/v2/boot_pb.d.ts +36 -36
  107. package/{js/metalstack → metalstack}/infra/v2/boot_pb.ts +36 -36
  108. package/{js/metalstack → metalstack}/infra/v2/component_pb.d.ts +5 -5
  109. package/{js/metalstack → metalstack}/infra/v2/component_pb.ts +5 -5
  110. package/{js/metalstack → metalstack}/infra/v2/event_pb.d.ts +3 -3
  111. package/{js/metalstack → metalstack}/infra/v2/event_pb.ts +3 -3
  112. package/{js/metalstack → metalstack}/infra/v2/switch_pb.d.ts +12 -12
  113. package/{js/metalstack → metalstack}/infra/v2/switch_pb.ts +12 -12
  114. package/package.json +4 -3
  115. package/test-interceptor.d.ts +9 -0
  116. package/test-interceptor.js +33 -0
  117. package/test-interceptor.ts +49 -0
  118. package/tsconfig.json +14 -0
  119. package/LICENSE +0 -21
  120. package/README.md +0 -117
  121. package/js/tsconfig.json +0 -70
  122. /package/{js/buf → buf}/validate/validate_pb.d.ts +0 -0
  123. /package/{js/buf → buf}/validate/validate_pb.js +0 -0
  124. /package/{js/buf → buf}/validate/validate_pb.ts +0 -0
  125. /package/{js/metalstack → metalstack}/admin/v2/audit_pb.js +0 -0
  126. /package/{js/metalstack → metalstack}/admin/v2/component_pb.js +0 -0
  127. /package/{js/metalstack → metalstack}/admin/v2/filesystem_pb.js +0 -0
  128. /package/{js/metalstack → metalstack}/admin/v2/image_pb.js +0 -0
  129. /package/{js/metalstack → metalstack}/admin/v2/ip_pb.js +0 -0
  130. /package/{js/metalstack → metalstack}/admin/v2/partition_pb.js +0 -0
  131. /package/{js/metalstack → metalstack}/admin/v2/project_pb.js +0 -0
  132. /package/{js/metalstack → metalstack}/admin/v2/size_imageconstraint_pb.js +0 -0
  133. /package/{js/metalstack → metalstack}/admin/v2/size_pb.js +0 -0
  134. /package/{js/metalstack → metalstack}/admin/v2/size_reservation_pb.js +0 -0
  135. /package/{js/metalstack → metalstack}/admin/v2/switch_pb.js +0 -0
  136. /package/{js/metalstack → metalstack}/admin/v2/tenant_pb.js +0 -0
  137. /package/{js/metalstack → metalstack}/admin/v2/token_pb.js +0 -0
  138. /package/{js/metalstack → metalstack}/admin/v2/vpn_pb.js +0 -0
  139. /package/{js/metalstack → metalstack}/api/v2/method_pb.js +0 -0
  140. /package/{js/metalstack → metalstack}/api/v2/partition_pb.js +0 -0
  141. /package/{js/metalstack → metalstack}/api/v2/project_pb.js +0 -0
  142. /package/{js/metalstack → metalstack}/api/v2/size_imageconstraint_pb.js +0 -0
  143. /package/{js/metalstack → metalstack}/api/v2/size_reservation_pb.js +0 -0
  144. /package/{js/metalstack → metalstack}/api/v2/tenant_pb.js +0 -0
  145. /package/{js/metalstack → metalstack}/api/v2/user_pb.js +0 -0
  146. /package/{js/metalstack → metalstack}/api/v2/version_pb.js +0 -0
  147. /package/{js/metalstack → metalstack}/api/v2/vpn_pb.js +0 -0
  148. /package/{js/metalstack → metalstack}/infra/v2/boot_pb.js +0 -0
  149. /package/{js/metalstack → metalstack}/infra/v2/component_pb.js +0 -0
  150. /package/{js/metalstack → metalstack}/infra/v2/event_pb.js +0 -0
  151. /package/{js/metalstack → metalstack}/infra/v2/switch_pb.js +0 -0
@@ -12,8 +12,11 @@ clean:
12
12
  .PHONY: build
13
13
  build: install
14
14
  ifeq ($(CI),true)
15
- cd .. &&\
16
15
  yq e -i -o=json ".version=\"$(VERSION_STRIPPED)\"" package.json &&\
17
16
  yq e -o=json ".version" package.json
18
17
  endif
19
- cd .. && bun run build
18
+ bun run build
19
+
20
+ .PHONY: test
21
+ test:
22
+ bun test ./client-test.ts
package/bun.lock ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 0,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "@metal-stack/api",
7
+ "dependencies": {
8
+ "@bufbuild/protobuf": "^2.13.0",
9
+ "@connectrpc/connect-web": "^2.1.2",
10
+ },
11
+ "devDependencies": {
12
+ "@types/bun": "^1.3.14",
13
+ "typescript": "^7.0.2",
14
+ },
15
+ },
16
+ },
17
+ "packages": {
18
+ "@bufbuild/protobuf": ["@bufbuild/protobuf@2.13.0", "", {}, "sha512-acq7c49vxfm1ggJ95P70TX7ABDM0vxr1SYD3BB0o0jnBLB4OAqeHyKuN+cD3w80gXEDQ2zxHpR6CUeA+O/aU9g=="],
19
+
20
+ "@connectrpc/connect": ["@connectrpc/connect@2.1.1", "", { "peerDependencies": { "@bufbuild/protobuf": "^2.7.0" } }, "sha512-JzhkaTvM73m2K1URT6tv53k2RwngSmCXLZJgK580qNQOXRzZRR/BCMfZw3h+90JpnG6XksP5bYT+cz0rpUzUWQ=="],
21
+
22
+ "@connectrpc/connect-web": ["@connectrpc/connect-web@2.1.2", "", { "peerDependencies": { "@bufbuild/protobuf": "^2.7.0", "@connectrpc/connect": "2.1.2" } }, "sha512-1tfaK85MU+gJjwwmL31d2rzdf0XCYX99chZf63uG89SGBUd4XuZ4ZzhGo2u79TPXOE6nLIZQ2okrpyey42PYdg=="],
23
+
24
+ "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
25
+
26
+ "@types/node": ["@types/node@26.2.0", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg=="],
27
+
28
+ "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],
29
+
30
+ "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],
31
+
32
+ "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],
33
+
34
+ "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],
35
+
36
+ "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],
37
+
38
+ "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],
39
+
40
+ "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],
41
+
42
+ "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],
43
+
44
+ "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],
45
+
46
+ "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],
47
+
48
+ "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],
49
+
50
+ "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],
51
+
52
+ "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],
53
+
54
+ "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],
55
+
56
+ "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],
57
+
58
+ "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],
59
+
60
+ "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],
61
+
62
+ "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],
63
+
64
+ "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],
65
+
66
+ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
67
+
68
+ "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
69
+
70
+ "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
71
+
72
+ "undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
73
+ }
74
+ }
@@ -0,0 +1 @@
1
+ export {};
package/client-test.js ADDED
@@ -0,0 +1,45 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { describe, it, expect } from "bun:test";
11
+ import { create } from "@bufbuild/protobuf";
12
+ import { VersionSchema, VersionServiceGetRequestSchema, VersionServiceGetResponseSchema, } from "./metalstack/api/v2/version_pb";
13
+ import { newClient } from "./client";
14
+ import { newTestInterceptor } from "./test-interceptor";
15
+ function unaryResponse(message) {
16
+ return {
17
+ stream: false,
18
+ message: message,
19
+ header: new Headers(),
20
+ trailer: new Headers(),
21
+ service: undefined,
22
+ method: undefined,
23
+ };
24
+ }
25
+ describe("client", () => {
26
+ it("works with test interceptor", () => __awaiter(void 0, void 0, void 0, function* () {
27
+ var _a;
28
+ const c = newClient({
29
+ baseUrl: "http://this-is-just-for-testing",
30
+ interceptors: [
31
+ newTestInterceptor([
32
+ {
33
+ wantRequest: create(VersionServiceGetRequestSchema, {}),
34
+ wantRequestSchema: VersionServiceGetRequestSchema,
35
+ wantResponse: () => unaryResponse(create(VersionServiceGetResponseSchema, {
36
+ version: create(VersionSchema, { version: "1.0" }),
37
+ })),
38
+ },
39
+ ]),
40
+ ],
41
+ });
42
+ const v = yield c.apiv2().version().get({});
43
+ expect((_a = v.version) === null || _a === void 0 ? void 0 : _a.version).toBe("1.0");
44
+ }));
45
+ });
package/client-test.ts ADDED
@@ -0,0 +1,49 @@
1
+ import { describe, it, expect } from "bun:test";
2
+ import { create } from "@bufbuild/protobuf";
3
+ import type { DescMessage, MessageShape } from "@bufbuild/protobuf";
4
+ import {
5
+ VersionSchema,
6
+ VersionServiceGetRequestSchema,
7
+ VersionServiceGetResponseSchema,
8
+ } from "./metalstack/api/v2/version_pb";
9
+ import type { UnaryResponse } from "@connectrpc/connect";
10
+ import { newClient } from "./client";
11
+ import { newTestInterceptor } from "./test-interceptor";
12
+
13
+ function unaryResponse<Req extends DescMessage, Res extends DescMessage>(
14
+ message: MessageShape<Res>,
15
+ ): UnaryResponse<Req, Res> {
16
+ return {
17
+ stream: false as const,
18
+ message: message as any,
19
+ header: new Headers(),
20
+ trailer: new Headers(),
21
+ service: undefined as any,
22
+ method: undefined as any,
23
+ };
24
+ }
25
+
26
+ describe("client", () => {
27
+ it("works with test interceptor", async () => {
28
+ const c = newClient({
29
+ baseUrl: "http://this-is-just-for-testing",
30
+ interceptors: [
31
+ newTestInterceptor([
32
+ {
33
+ wantRequest: create(VersionServiceGetRequestSchema, {}),
34
+ wantRequestSchema: VersionServiceGetRequestSchema,
35
+ wantResponse: () =>
36
+ unaryResponse(
37
+ create(VersionServiceGetResponseSchema, {
38
+ version: create(VersionSchema, { version: "1.0" }),
39
+ }),
40
+ ),
41
+ },
42
+ ]),
43
+ ],
44
+ });
45
+
46
+ const v = await c.apiv2().version().get({});
47
+ expect(v.version?.version).toBe("1.0");
48
+ });
49
+ });
package/client.d.ts ADDED
@@ -0,0 +1,97 @@
1
+ import { Interceptor } from "@connectrpc/connect";
2
+ import type { Client as ConnectClient } from "@connectrpc/connect";
3
+ import { AuditService as Adminv2AuditService } from "./metalstack/admin/v2/audit_pb";
4
+ import { ComponentService as Adminv2ComponentService } from "./metalstack/admin/v2/component_pb";
5
+ import { FilesystemService as Adminv2FilesystemService } from "./metalstack/admin/v2/filesystem_pb";
6
+ import { ImageService as Adminv2ImageService } from "./metalstack/admin/v2/image_pb";
7
+ import { IPService as Adminv2IPService } from "./metalstack/admin/v2/ip_pb";
8
+ import { MachineService as Adminv2MachineService } from "./metalstack/admin/v2/machine_pb";
9
+ import { NetworkService as Adminv2NetworkService } from "./metalstack/admin/v2/network_pb";
10
+ import { PartitionService as Adminv2PartitionService } from "./metalstack/admin/v2/partition_pb";
11
+ import { ProjectService as Adminv2ProjectService } from "./metalstack/admin/v2/project_pb";
12
+ import { SizeService as Adminv2SizeService } from "./metalstack/admin/v2/size_pb";
13
+ import { SizeImageConstraintService as Adminv2SizeImageConstraintService } from "./metalstack/admin/v2/size_imageconstraint_pb";
14
+ import { SizeReservationService as Adminv2SizeReservationService } from "./metalstack/admin/v2/size_reservation_pb";
15
+ import { SwitchService as Adminv2SwitchService } from "./metalstack/admin/v2/switch_pb";
16
+ import { TaskService as Adminv2TaskService } from "./metalstack/admin/v2/task_pb";
17
+ import { TenantService as Adminv2TenantService } from "./metalstack/admin/v2/tenant_pb";
18
+ import { TokenService as Adminv2TokenService } from "./metalstack/admin/v2/token_pb";
19
+ import { VPNService as Adminv2VPNService } from "./metalstack/admin/v2/vpn_pb";
20
+ import { AuditService as Apiv2AuditService } from "./metalstack/api/v2/audit_pb";
21
+ import { FilesystemService as Apiv2FilesystemService } from "./metalstack/api/v2/filesystem_pb";
22
+ import { HealthService as Apiv2HealthService } from "./metalstack/api/v2/health_pb";
23
+ import { ImageService as Apiv2ImageService } from "./metalstack/api/v2/image_pb";
24
+ import { IPService as Apiv2IPService } from "./metalstack/api/v2/ip_pb";
25
+ import { MachineService as Apiv2MachineService } from "./metalstack/api/v2/machine_pb";
26
+ import { MethodService as Apiv2MethodService } from "./metalstack/api/v2/method_pb";
27
+ import { NetworkService as Apiv2NetworkService } from "./metalstack/api/v2/network_pb";
28
+ import { PartitionService as Apiv2PartitionService } from "./metalstack/api/v2/partition_pb";
29
+ import { ProjectService as Apiv2ProjectService } from "./metalstack/api/v2/project_pb";
30
+ import { SizeService as Apiv2SizeService } from "./metalstack/api/v2/size_pb";
31
+ import { SizeImageConstraintService as Apiv2SizeImageConstraintService } from "./metalstack/api/v2/size_imageconstraint_pb";
32
+ import { SizeReservationService as Apiv2SizeReservationService } from "./metalstack/api/v2/size_reservation_pb";
33
+ import { TenantService as Apiv2TenantService } from "./metalstack/api/v2/tenant_pb";
34
+ import { TokenService as Apiv2TokenService } from "./metalstack/api/v2/token_pb";
35
+ import { UserService as Apiv2UserService } from "./metalstack/api/v2/user_pb";
36
+ import { VersionService as Apiv2VersionService } from "./metalstack/api/v2/version_pb";
37
+ import { BMCService as Infrav2BMCService } from "./metalstack/infra/v2/bmc_pb";
38
+ import { BootService as Infrav2BootService } from "./metalstack/infra/v2/boot_pb";
39
+ import { ComponentService as Infrav2ComponentService } from "./metalstack/infra/v2/component_pb";
40
+ import { EventService as Infrav2EventService } from "./metalstack/infra/v2/event_pb";
41
+ import { SwitchService as Infrav2SwitchService } from "./metalstack/infra/v2/switch_pb";
42
+ export interface ClientConfig {
43
+ baseUrl: string;
44
+ token?: string;
45
+ interceptors?: Interceptor[];
46
+ }
47
+ export interface Client {
48
+ adminv2(): Adminv2;
49
+ apiv2(): Apiv2;
50
+ infrav2(): Infrav2;
51
+ }
52
+ export interface Adminv2 {
53
+ audit(): ConnectClient<typeof Adminv2AuditService>;
54
+ component(): ConnectClient<typeof Adminv2ComponentService>;
55
+ filesystem(): ConnectClient<typeof Adminv2FilesystemService>;
56
+ image(): ConnectClient<typeof Adminv2ImageService>;
57
+ ip(): ConnectClient<typeof Adminv2IPService>;
58
+ machine(): ConnectClient<typeof Adminv2MachineService>;
59
+ network(): ConnectClient<typeof Adminv2NetworkService>;
60
+ partition(): ConnectClient<typeof Adminv2PartitionService>;
61
+ project(): ConnectClient<typeof Adminv2ProjectService>;
62
+ size(): ConnectClient<typeof Adminv2SizeService>;
63
+ sizeImageConstraint(): ConnectClient<typeof Adminv2SizeImageConstraintService>;
64
+ sizeReservation(): ConnectClient<typeof Adminv2SizeReservationService>;
65
+ switch(): ConnectClient<typeof Adminv2SwitchService>;
66
+ task(): ConnectClient<typeof Adminv2TaskService>;
67
+ tenant(): ConnectClient<typeof Adminv2TenantService>;
68
+ token(): ConnectClient<typeof Adminv2TokenService>;
69
+ vpn(): ConnectClient<typeof Adminv2VPNService>;
70
+ }
71
+ export interface Apiv2 {
72
+ audit(): ConnectClient<typeof Apiv2AuditService>;
73
+ filesystem(): ConnectClient<typeof Apiv2FilesystemService>;
74
+ health(): ConnectClient<typeof Apiv2HealthService>;
75
+ image(): ConnectClient<typeof Apiv2ImageService>;
76
+ ip(): ConnectClient<typeof Apiv2IPService>;
77
+ machine(): ConnectClient<typeof Apiv2MachineService>;
78
+ method(): ConnectClient<typeof Apiv2MethodService>;
79
+ network(): ConnectClient<typeof Apiv2NetworkService>;
80
+ partition(): ConnectClient<typeof Apiv2PartitionService>;
81
+ project(): ConnectClient<typeof Apiv2ProjectService>;
82
+ size(): ConnectClient<typeof Apiv2SizeService>;
83
+ sizeImageConstraint(): ConnectClient<typeof Apiv2SizeImageConstraintService>;
84
+ sizeReservation(): ConnectClient<typeof Apiv2SizeReservationService>;
85
+ tenant(): ConnectClient<typeof Apiv2TenantService>;
86
+ token(): ConnectClient<typeof Apiv2TokenService>;
87
+ user(): ConnectClient<typeof Apiv2UserService>;
88
+ version(): ConnectClient<typeof Apiv2VersionService>;
89
+ }
90
+ export interface Infrav2 {
91
+ bmc(): ConnectClient<typeof Infrav2BMCService>;
92
+ boot(): ConnectClient<typeof Infrav2BootService>;
93
+ component(): ConnectClient<typeof Infrav2ComponentService>;
94
+ event(): ConnectClient<typeof Infrav2EventService>;
95
+ switch(): ConnectClient<typeof Infrav2SwitchService>;
96
+ }
97
+ export declare function newClient(config: ClientConfig): Client;
package/client.js ADDED
@@ -0,0 +1,347 @@
1
+ // Code generated by generate_clients.go. DO NOT EDIT.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { createClient } from "@connectrpc/connect";
12
+ import { createConnectTransport } from "@connectrpc/connect-web";
13
+ import { AuditService as Adminv2AuditService } from "./metalstack/admin/v2/audit_pb";
14
+ import { ComponentService as Adminv2ComponentService } from "./metalstack/admin/v2/component_pb";
15
+ import { FilesystemService as Adminv2FilesystemService } from "./metalstack/admin/v2/filesystem_pb";
16
+ import { ImageService as Adminv2ImageService } from "./metalstack/admin/v2/image_pb";
17
+ import { IPService as Adminv2IPService } from "./metalstack/admin/v2/ip_pb";
18
+ import { MachineService as Adminv2MachineService } from "./metalstack/admin/v2/machine_pb";
19
+ import { NetworkService as Adminv2NetworkService } from "./metalstack/admin/v2/network_pb";
20
+ import { PartitionService as Adminv2PartitionService } from "./metalstack/admin/v2/partition_pb";
21
+ import { ProjectService as Adminv2ProjectService } from "./metalstack/admin/v2/project_pb";
22
+ import { SizeService as Adminv2SizeService } from "./metalstack/admin/v2/size_pb";
23
+ import { SizeImageConstraintService as Adminv2SizeImageConstraintService } from "./metalstack/admin/v2/size_imageconstraint_pb";
24
+ import { SizeReservationService as Adminv2SizeReservationService } from "./metalstack/admin/v2/size_reservation_pb";
25
+ import { SwitchService as Adminv2SwitchService } from "./metalstack/admin/v2/switch_pb";
26
+ import { TaskService as Adminv2TaskService } from "./metalstack/admin/v2/task_pb";
27
+ import { TenantService as Adminv2TenantService } from "./metalstack/admin/v2/tenant_pb";
28
+ import { TokenService as Adminv2TokenService } from "./metalstack/admin/v2/token_pb";
29
+ import { VPNService as Adminv2VPNService } from "./metalstack/admin/v2/vpn_pb";
30
+ import { AuditService as Apiv2AuditService } from "./metalstack/api/v2/audit_pb";
31
+ import { FilesystemService as Apiv2FilesystemService } from "./metalstack/api/v2/filesystem_pb";
32
+ import { HealthService as Apiv2HealthService } from "./metalstack/api/v2/health_pb";
33
+ import { ImageService as Apiv2ImageService } from "./metalstack/api/v2/image_pb";
34
+ import { IPService as Apiv2IPService } from "./metalstack/api/v2/ip_pb";
35
+ import { MachineService as Apiv2MachineService } from "./metalstack/api/v2/machine_pb";
36
+ import { MethodService as Apiv2MethodService } from "./metalstack/api/v2/method_pb";
37
+ import { NetworkService as Apiv2NetworkService } from "./metalstack/api/v2/network_pb";
38
+ import { PartitionService as Apiv2PartitionService } from "./metalstack/api/v2/partition_pb";
39
+ import { ProjectService as Apiv2ProjectService } from "./metalstack/api/v2/project_pb";
40
+ import { SizeService as Apiv2SizeService } from "./metalstack/api/v2/size_pb";
41
+ import { SizeImageConstraintService as Apiv2SizeImageConstraintService } from "./metalstack/api/v2/size_imageconstraint_pb";
42
+ import { SizeReservationService as Apiv2SizeReservationService } from "./metalstack/api/v2/size_reservation_pb";
43
+ import { TenantService as Apiv2TenantService } from "./metalstack/api/v2/tenant_pb";
44
+ import { TokenService as Apiv2TokenService } from "./metalstack/api/v2/token_pb";
45
+ import { UserService as Apiv2UserService } from "./metalstack/api/v2/user_pb";
46
+ import { VersionService as Apiv2VersionService } from "./metalstack/api/v2/version_pb";
47
+ import { BMCService as Infrav2BMCService } from "./metalstack/infra/v2/bmc_pb";
48
+ import { BootService as Infrav2BootService } from "./metalstack/infra/v2/boot_pb";
49
+ import { ComponentService as Infrav2ComponentService } from "./metalstack/infra/v2/component_pb";
50
+ import { EventService as Infrav2EventService } from "./metalstack/infra/v2/event_pb";
51
+ import { SwitchService as Infrav2SwitchService } from "./metalstack/infra/v2/switch_pb";
52
+ function authInterceptor(token) {
53
+ return (next) => (req) => __awaiter(this, void 0, void 0, function* () {
54
+ req.header.set("Authorization", `Bearer ${token}`);
55
+ return yield next(req);
56
+ });
57
+ }
58
+ function buildTransport(config) {
59
+ const interceptors = [];
60
+ if (config.token) {
61
+ interceptors.push(authInterceptor(config.token));
62
+ }
63
+ if (config.interceptors) {
64
+ interceptors.push(...config.interceptors);
65
+ }
66
+ return createConnectTransport({
67
+ baseUrl: config.baseUrl,
68
+ interceptors: interceptors.length > 0 ? interceptors : undefined,
69
+ defaultTimeoutMs: 30000,
70
+ });
71
+ }
72
+ export function newClient(config) {
73
+ const transport = buildTransport(config);
74
+ return new ClientImpl(transport);
75
+ }
76
+ class ClientImpl {
77
+ constructor(transport) {
78
+ this.transport = transport;
79
+ }
80
+ adminv2() {
81
+ if (!this._adminv2) {
82
+ this._adminv2 = new Adminv2Impl(this.transport);
83
+ }
84
+ return this._adminv2;
85
+ }
86
+ apiv2() {
87
+ if (!this._apiv2) {
88
+ this._apiv2 = new Apiv2Impl(this.transport);
89
+ }
90
+ return this._apiv2;
91
+ }
92
+ infrav2() {
93
+ if (!this._infrav2) {
94
+ this._infrav2 = new Infrav2Impl(this.transport);
95
+ }
96
+ return this._infrav2;
97
+ }
98
+ }
99
+ class Adminv2Impl {
100
+ constructor(transport) {
101
+ this.transport = transport;
102
+ }
103
+ audit() {
104
+ if (!this._audit) {
105
+ this._audit = createClient(Adminv2AuditService, this.transport);
106
+ }
107
+ return this._audit;
108
+ }
109
+ component() {
110
+ if (!this._component) {
111
+ this._component = createClient(Adminv2ComponentService, this.transport);
112
+ }
113
+ return this._component;
114
+ }
115
+ filesystem() {
116
+ if (!this._filesystem) {
117
+ this._filesystem = createClient(Adminv2FilesystemService, this.transport);
118
+ }
119
+ return this._filesystem;
120
+ }
121
+ image() {
122
+ if (!this._image) {
123
+ this._image = createClient(Adminv2ImageService, this.transport);
124
+ }
125
+ return this._image;
126
+ }
127
+ ip() {
128
+ if (!this._ip) {
129
+ this._ip = createClient(Adminv2IPService, this.transport);
130
+ }
131
+ return this._ip;
132
+ }
133
+ machine() {
134
+ if (!this._machine) {
135
+ this._machine = createClient(Adminv2MachineService, this.transport);
136
+ }
137
+ return this._machine;
138
+ }
139
+ network() {
140
+ if (!this._network) {
141
+ this._network = createClient(Adminv2NetworkService, this.transport);
142
+ }
143
+ return this._network;
144
+ }
145
+ partition() {
146
+ if (!this._partition) {
147
+ this._partition = createClient(Adminv2PartitionService, this.transport);
148
+ }
149
+ return this._partition;
150
+ }
151
+ project() {
152
+ if (!this._project) {
153
+ this._project = createClient(Adminv2ProjectService, this.transport);
154
+ }
155
+ return this._project;
156
+ }
157
+ size() {
158
+ if (!this._size) {
159
+ this._size = createClient(Adminv2SizeService, this.transport);
160
+ }
161
+ return this._size;
162
+ }
163
+ sizeImageConstraint() {
164
+ if (!this._sizeImageConstraint) {
165
+ this._sizeImageConstraint = createClient(Adminv2SizeImageConstraintService, this.transport);
166
+ }
167
+ return this._sizeImageConstraint;
168
+ }
169
+ sizeReservation() {
170
+ if (!this._sizeReservation) {
171
+ this._sizeReservation = createClient(Adminv2SizeReservationService, this.transport);
172
+ }
173
+ return this._sizeReservation;
174
+ }
175
+ switch() {
176
+ if (!this._switch) {
177
+ this._switch = createClient(Adminv2SwitchService, this.transport);
178
+ }
179
+ return this._switch;
180
+ }
181
+ task() {
182
+ if (!this._task) {
183
+ this._task = createClient(Adminv2TaskService, this.transport);
184
+ }
185
+ return this._task;
186
+ }
187
+ tenant() {
188
+ if (!this._tenant) {
189
+ this._tenant = createClient(Adminv2TenantService, this.transport);
190
+ }
191
+ return this._tenant;
192
+ }
193
+ token() {
194
+ if (!this._token) {
195
+ this._token = createClient(Adminv2TokenService, this.transport);
196
+ }
197
+ return this._token;
198
+ }
199
+ vpn() {
200
+ if (!this._vpn) {
201
+ this._vpn = createClient(Adminv2VPNService, this.transport);
202
+ }
203
+ return this._vpn;
204
+ }
205
+ }
206
+ class Apiv2Impl {
207
+ constructor(transport) {
208
+ this.transport = transport;
209
+ }
210
+ audit() {
211
+ if (!this._audit) {
212
+ this._audit = createClient(Apiv2AuditService, this.transport);
213
+ }
214
+ return this._audit;
215
+ }
216
+ filesystem() {
217
+ if (!this._filesystem) {
218
+ this._filesystem = createClient(Apiv2FilesystemService, this.transport);
219
+ }
220
+ return this._filesystem;
221
+ }
222
+ health() {
223
+ if (!this._health) {
224
+ this._health = createClient(Apiv2HealthService, this.transport);
225
+ }
226
+ return this._health;
227
+ }
228
+ image() {
229
+ if (!this._image) {
230
+ this._image = createClient(Apiv2ImageService, this.transport);
231
+ }
232
+ return this._image;
233
+ }
234
+ ip() {
235
+ if (!this._ip) {
236
+ this._ip = createClient(Apiv2IPService, this.transport);
237
+ }
238
+ return this._ip;
239
+ }
240
+ machine() {
241
+ if (!this._machine) {
242
+ this._machine = createClient(Apiv2MachineService, this.transport);
243
+ }
244
+ return this._machine;
245
+ }
246
+ method() {
247
+ if (!this._method) {
248
+ this._method = createClient(Apiv2MethodService, this.transport);
249
+ }
250
+ return this._method;
251
+ }
252
+ network() {
253
+ if (!this._network) {
254
+ this._network = createClient(Apiv2NetworkService, this.transport);
255
+ }
256
+ return this._network;
257
+ }
258
+ partition() {
259
+ if (!this._partition) {
260
+ this._partition = createClient(Apiv2PartitionService, this.transport);
261
+ }
262
+ return this._partition;
263
+ }
264
+ project() {
265
+ if (!this._project) {
266
+ this._project = createClient(Apiv2ProjectService, this.transport);
267
+ }
268
+ return this._project;
269
+ }
270
+ size() {
271
+ if (!this._size) {
272
+ this._size = createClient(Apiv2SizeService, this.transport);
273
+ }
274
+ return this._size;
275
+ }
276
+ sizeImageConstraint() {
277
+ if (!this._sizeImageConstraint) {
278
+ this._sizeImageConstraint = createClient(Apiv2SizeImageConstraintService, this.transport);
279
+ }
280
+ return this._sizeImageConstraint;
281
+ }
282
+ sizeReservation() {
283
+ if (!this._sizeReservation) {
284
+ this._sizeReservation = createClient(Apiv2SizeReservationService, this.transport);
285
+ }
286
+ return this._sizeReservation;
287
+ }
288
+ tenant() {
289
+ if (!this._tenant) {
290
+ this._tenant = createClient(Apiv2TenantService, this.transport);
291
+ }
292
+ return this._tenant;
293
+ }
294
+ token() {
295
+ if (!this._token) {
296
+ this._token = createClient(Apiv2TokenService, this.transport);
297
+ }
298
+ return this._token;
299
+ }
300
+ user() {
301
+ if (!this._user) {
302
+ this._user = createClient(Apiv2UserService, this.transport);
303
+ }
304
+ return this._user;
305
+ }
306
+ version() {
307
+ if (!this._version) {
308
+ this._version = createClient(Apiv2VersionService, this.transport);
309
+ }
310
+ return this._version;
311
+ }
312
+ }
313
+ class Infrav2Impl {
314
+ constructor(transport) {
315
+ this.transport = transport;
316
+ }
317
+ bmc() {
318
+ if (!this._bmc) {
319
+ this._bmc = createClient(Infrav2BMCService, this.transport);
320
+ }
321
+ return this._bmc;
322
+ }
323
+ boot() {
324
+ if (!this._boot) {
325
+ this._boot = createClient(Infrav2BootService, this.transport);
326
+ }
327
+ return this._boot;
328
+ }
329
+ component() {
330
+ if (!this._component) {
331
+ this._component = createClient(Infrav2ComponentService, this.transport);
332
+ }
333
+ return this._component;
334
+ }
335
+ event() {
336
+ if (!this._event) {
337
+ this._event = createClient(Infrav2EventService, this.transport);
338
+ }
339
+ return this._event;
340
+ }
341
+ switch() {
342
+ if (!this._switch) {
343
+ this._switch = createClient(Infrav2SwitchService, this.transport);
344
+ }
345
+ return this._switch;
346
+ }
347
+ }