@metal-stack/api 0.0.40-beta.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.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/js/Makefile +16 -0
  4. package/js/buf/validate/validate_pb.d.ts +4597 -0
  5. package/js/buf/validate/validate_pb.js +351 -0
  6. package/js/buf/validate/validate_pb.ts +4938 -0
  7. package/js/metalstack/admin/v2/filesystem_pb.d.ts +207 -0
  8. package/js/metalstack/admin/v2/filesystem_pb.js +48 -0
  9. package/js/metalstack/admin/v2/filesystem_pb.ts +248 -0
  10. package/js/metalstack/admin/v2/image_pb.d.ts +242 -0
  11. package/js/metalstack/admin/v2/image_pb.js +59 -0
  12. package/js/metalstack/admin/v2/image_pb.ts +288 -0
  13. package/js/metalstack/admin/v2/ip_pb.d.ts +60 -0
  14. package/js/metalstack/admin/v2/ip_pb.js +26 -0
  15. package/js/metalstack/admin/v2/ip_pb.ts +78 -0
  16. package/js/metalstack/admin/v2/machine_pb.d.ts +113 -0
  17. package/js/metalstack/admin/v2/machine_pb.js +38 -0
  18. package/js/metalstack/admin/v2/machine_pb.ts +140 -0
  19. package/js/metalstack/admin/v2/network_pb.d.ts +407 -0
  20. package/js/metalstack/admin/v2/network_pb.js +68 -0
  21. package/js/metalstack/admin/v2/network_pb.ts +478 -0
  22. package/js/metalstack/admin/v2/partition_pb.d.ts +341 -0
  23. package/js/metalstack/admin/v2/partition_pb.js +58 -0
  24. package/js/metalstack/admin/v2/partition_pb.ts +402 -0
  25. package/js/metalstack/admin/v2/project_pb.d.ts +67 -0
  26. package/js/metalstack/admin/v2/project_pb.js +27 -0
  27. package/js/metalstack/admin/v2/project_pb.ts +87 -0
  28. package/js/metalstack/admin/v2/size_pb.d.ts +183 -0
  29. package/js/metalstack/admin/v2/size_pb.js +48 -0
  30. package/js/metalstack/admin/v2/size_pb.ts +220 -0
  31. package/js/metalstack/admin/v2/switch_pb.d.ts +377 -0
  32. package/js/metalstack/admin/v2/switch_pb.js +79 -0
  33. package/js/metalstack/admin/v2/switch_pb.ts +435 -0
  34. package/js/metalstack/admin/v2/tenant_pb.d.ts +149 -0
  35. package/js/metalstack/admin/v2/tenant_pb.js +38 -0
  36. package/js/metalstack/admin/v2/tenant_pb.ts +182 -0
  37. package/js/metalstack/admin/v2/token_pb.d.ts +164 -0
  38. package/js/metalstack/admin/v2/token_pb.js +47 -0
  39. package/js/metalstack/admin/v2/token_pb.ts +199 -0
  40. package/js/metalstack/admin/v2/vpn_pb.ts +184 -0
  41. package/js/metalstack/api/v2/common_pb.d.ts +407 -0
  42. package/js/metalstack/api/v2/common_pb.js +311 -0
  43. package/js/metalstack/api/v2/common_pb.ts +488 -0
  44. package/js/metalstack/api/v2/filesystem_pb.d.ts +704 -0
  45. package/js/metalstack/api/v2/filesystem_pb.js +259 -0
  46. package/js/metalstack/api/v2/filesystem_pb.ts +819 -0
  47. package/js/metalstack/api/v2/health_pb.d.ts +220 -0
  48. package/js/metalstack/api/v2/health_pb.js +130 -0
  49. package/js/metalstack/api/v2/health_pb.ts +264 -0
  50. package/js/metalstack/api/v2/image_pb.d.ts +368 -0
  51. package/js/metalstack/api/v2/image_pb.js +129 -0
  52. package/js/metalstack/api/v2/image_pb.ts +436 -0
  53. package/js/metalstack/api/v2/ip_pb.d.ts +555 -0
  54. package/js/metalstack/api/v2/ip_pb.js +137 -0
  55. package/js/metalstack/api/v2/ip_pb.ts +650 -0
  56. package/js/metalstack/api/v2/machine_pb.d.ts +1831 -0
  57. package/js/metalstack/api/v2/machine_pb.js +459 -0
  58. package/js/metalstack/api/v2/machine_pb.ts +2155 -0
  59. package/js/metalstack/api/v2/method_pb.d.ts +122 -0
  60. package/js/metalstack/api/v2/method_pb.js +38 -0
  61. package/js/metalstack/api/v2/method_pb.ts +149 -0
  62. package/js/metalstack/api/v2/network_pb.d.ts +820 -0
  63. package/js/metalstack/api/v2/network_pb.js +244 -0
  64. package/js/metalstack/api/v2/network_pb.ts +954 -0
  65. package/js/metalstack/api/v2/partition_pb.d.ts +251 -0
  66. package/js/metalstack/api/v2/partition_pb.js +62 -0
  67. package/js/metalstack/api/v2/partition_pb.ts +300 -0
  68. package/js/metalstack/api/v2/predefined_rules_pb.d.ts +54 -0
  69. package/js/metalstack/api/v2/predefined_rules_pb.js +57 -0
  70. package/js/metalstack/api/v2/predefined_rules_pb.ts +79 -0
  71. package/js/metalstack/api/v2/project_pb.d.ts +862 -0
  72. package/js/metalstack/api/v2/project_pb.js +163 -0
  73. package/js/metalstack/api/v2/project_pb.ts +1001 -0
  74. package/js/metalstack/api/v2/size_pb.d.ts +261 -0
  75. package/js/metalstack/api/v2/size_pb.js +94 -0
  76. package/js/metalstack/api/v2/size_pb.ts +312 -0
  77. package/js/metalstack/api/v2/switch_pb.d.ts +508 -0
  78. package/js/metalstack/api/v2/switch_pb.js +207 -0
  79. package/js/metalstack/api/v2/switch_pb.ts +653 -0
  80. package/js/metalstack/api/v2/tenant_pb.d.ts +864 -0
  81. package/js/metalstack/api/v2/tenant_pb.js +163 -0
  82. package/js/metalstack/api/v2/tenant_pb.ts +1004 -0
  83. package/js/metalstack/api/v2/token_pb.d.ts +540 -0
  84. package/js/metalstack/api/v2/token_pb.js +118 -0
  85. package/js/metalstack/api/v2/token_pb.ts +621 -0
  86. package/js/metalstack/api/v2/user_pb.d.ts +108 -0
  87. package/js/metalstack/api/v2/user_pb.js +34 -0
  88. package/js/metalstack/api/v2/user_pb.ts +139 -0
  89. package/js/metalstack/api/v2/version_pb.d.ts +88 -0
  90. package/js/metalstack/api/v2/version_pb.js +30 -0
  91. package/js/metalstack/api/v2/version_pb.ts +112 -0
  92. package/js/metalstack/api/v2/vpn_pb.ts +72 -0
  93. package/js/metalstack/infra/v2/bmc_pb.d.ts +45 -0
  94. package/js/metalstack/infra/v2/bmc_pb.js +25 -0
  95. package/js/metalstack/infra/v2/bmc_pb.ts +104 -0
  96. package/js/metalstack/infra/v2/event_pb.d.ts +181 -0
  97. package/js/metalstack/infra/v2/event_pb.js +116 -0
  98. package/js/metalstack/infra/v2/event_pb.ts +218 -0
  99. package/js/metalstack/infra/v2/switch_pb.d.ts +223 -0
  100. package/js/metalstack/infra/v2/switch_pb.js +54 -0
  101. package/js/metalstack/infra/v2/switch_pb.ts +228 -0
  102. package/js/tsconfig.json +70 -0
  103. package/package.json +21 -0
@@ -0,0 +1,223 @@
1
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
3
+ import type { Switch, SwitchBGPPortState, SwitchPortStatus } from "../../api/v2/switch_pb";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file metalstack/infra/v2/switch.proto.
7
+ */
8
+ export declare const file_metalstack_infra_v2_switch: GenFile;
9
+ /**
10
+ * SwitchServiceGetRequest.
11
+ *
12
+ * @generated from message metalstack.infra.v2.SwitchServiceGetRequest
13
+ */
14
+ export type SwitchServiceGetRequest = Message<"metalstack.infra.v2.SwitchServiceGetRequest"> & {
15
+ /**
16
+ * Id of the switch.
17
+ *
18
+ * @generated from field: string id = 1;
19
+ */
20
+ id: string;
21
+ };
22
+ /**
23
+ * Describes the message metalstack.infra.v2.SwitchServiceGetRequest.
24
+ * Use `create(SwitchServiceGetRequestSchema)` to create a new message.
25
+ */
26
+ export declare const SwitchServiceGetRequestSchema: GenMessage<SwitchServiceGetRequest>;
27
+ /**
28
+ * SwitchServiceGetResponse.
29
+ *
30
+ * @generated from message metalstack.infra.v2.SwitchServiceGetResponse
31
+ */
32
+ export type SwitchServiceGetResponse = Message<"metalstack.infra.v2.SwitchServiceGetResponse"> & {
33
+ /**
34
+ * Switch that was requested.
35
+ *
36
+ * @generated from field: metalstack.api.v2.Switch switch = 1;
37
+ */
38
+ switch?: Switch;
39
+ };
40
+ /**
41
+ * Describes the message metalstack.infra.v2.SwitchServiceGetResponse.
42
+ * Use `create(SwitchServiceGetResponseSchema)` to create a new message.
43
+ */
44
+ export declare const SwitchServiceGetResponseSchema: GenMessage<SwitchServiceGetResponse>;
45
+ /**
46
+ * SwitchServiceRegisterRequest.
47
+ *
48
+ * @generated from message metalstack.infra.v2.SwitchServiceRegisterRequest
49
+ */
50
+ export type SwitchServiceRegisterRequest = Message<"metalstack.infra.v2.SwitchServiceRegisterRequest"> & {
51
+ /**
52
+ * Switch to register.
53
+ *
54
+ * @generated from field: metalstack.api.v2.Switch switch = 1;
55
+ */
56
+ switch?: Switch;
57
+ };
58
+ /**
59
+ * Describes the message metalstack.infra.v2.SwitchServiceRegisterRequest.
60
+ * Use `create(SwitchServiceRegisterRequestSchema)` to create a new message.
61
+ */
62
+ export declare const SwitchServiceRegisterRequestSchema: GenMessage<SwitchServiceRegisterRequest>;
63
+ /**
64
+ * SwitchServiceRegisterResponse.
65
+ *
66
+ * @generated from message metalstack.infra.v2.SwitchServiceRegisterResponse
67
+ */
68
+ export type SwitchServiceRegisterResponse = Message<"metalstack.infra.v2.SwitchServiceRegisterResponse"> & {
69
+ /**
70
+ * Switch that was registered.
71
+ *
72
+ * @generated from field: metalstack.api.v2.Switch switch = 1;
73
+ */
74
+ switch?: Switch;
75
+ };
76
+ /**
77
+ * Describes the message metalstack.infra.v2.SwitchServiceRegisterResponse.
78
+ * Use `create(SwitchServiceRegisterResponseSchema)` to create a new message.
79
+ */
80
+ export declare const SwitchServiceRegisterResponseSchema: GenMessage<SwitchServiceRegisterResponse>;
81
+ /**
82
+ * SwitchServiceHeartbeatRequest.
83
+ *
84
+ * @generated from message metalstack.infra.v2.SwitchServiceHeartbeatRequest
85
+ */
86
+ export type SwitchServiceHeartbeatRequest = Message<"metalstack.infra.v2.SwitchServiceHeartbeatRequest"> & {
87
+ /**
88
+ * Id of the switch.
89
+ *
90
+ * @generated from field: string id = 1;
91
+ */
92
+ id: string;
93
+ /**
94
+ * Duration of the sync.
95
+ *
96
+ * @generated from field: google.protobuf.Duration duration = 2;
97
+ */
98
+ duration?: Duration;
99
+ /**
100
+ * Error if any occurred during the sync.
101
+ *
102
+ * @generated from field: optional string error = 3;
103
+ */
104
+ error?: string;
105
+ /**
106
+ * PortStates maps port identifiers to the respective port's operational state.
107
+ *
108
+ * @generated from field: map<string, metalstack.api.v2.SwitchPortStatus> port_states = 4;
109
+ */
110
+ portStates: {
111
+ [key: string]: SwitchPortStatus;
112
+ };
113
+ /**
114
+ * BgpPortStates maps port identifiers to the respective port's BGP state.
115
+ *
116
+ * @generated from field: map<string, metalstack.api.v2.SwitchBGPPortState> bgp_port_states = 5;
117
+ */
118
+ bgpPortStates: {
119
+ [key: string]: SwitchBGPPortState;
120
+ };
121
+ };
122
+ /**
123
+ * Describes the message metalstack.infra.v2.SwitchServiceHeartbeatRequest.
124
+ * Use `create(SwitchServiceHeartbeatRequestSchema)` to create a new message.
125
+ */
126
+ export declare const SwitchServiceHeartbeatRequestSchema: GenMessage<SwitchServiceHeartbeatRequest>;
127
+ /**
128
+ * SwitchServiceHeartbeatResponse.
129
+ *
130
+ * @generated from message metalstack.infra.v2.SwitchServiceHeartbeatResponse
131
+ */
132
+ export type SwitchServiceHeartbeatResponse = Message<"metalstack.infra.v2.SwitchServiceHeartbeatResponse"> & {
133
+ /**
134
+ * Id of the switch.
135
+ *
136
+ * @generated from field: string id = 1;
137
+ */
138
+ id: string;
139
+ /**
140
+ * LastSync holds information about the last sync.
141
+ *
142
+ * @generated from field: metalstack.infra.v2.SwitchSync last_sync = 2;
143
+ */
144
+ lastSync?: SwitchSync;
145
+ /**
146
+ * LastSyncError holds information about the last erroneous sync.
147
+ *
148
+ * @generated from field: metalstack.infra.v2.SwitchSync last_sync_error = 3;
149
+ */
150
+ lastSyncError?: SwitchSync;
151
+ };
152
+ /**
153
+ * Describes the message metalstack.infra.v2.SwitchServiceHeartbeatResponse.
154
+ * Use `create(SwitchServiceHeartbeatResponseSchema)` to create a new message.
155
+ */
156
+ export declare const SwitchServiceHeartbeatResponseSchema: GenMessage<SwitchServiceHeartbeatResponse>;
157
+ /**
158
+ * SwitchSync summarizes information about a switch sync.
159
+ *
160
+ * @generated from message metalstack.infra.v2.SwitchSync
161
+ */
162
+ export type SwitchSync = Message<"metalstack.infra.v2.SwitchSync"> & {
163
+ /**
164
+ * Time of the sync.
165
+ *
166
+ * @generated from field: google.protobuf.Timestamp time = 1;
167
+ */
168
+ time?: Timestamp;
169
+ /**
170
+ * Duration of the sync.
171
+ *
172
+ * @generated from field: google.protobuf.Duration duration = 2;
173
+ */
174
+ duration?: Duration;
175
+ /**
176
+ * Error if any occurred.
177
+ *
178
+ * @generated from field: optional string error = 3;
179
+ */
180
+ error?: string;
181
+ };
182
+ /**
183
+ * Describes the message metalstack.infra.v2.SwitchSync.
184
+ * Use `create(SwitchSyncSchema)` to create a new message.
185
+ */
186
+ export declare const SwitchSyncSchema: GenMessage<SwitchSync>;
187
+ /**
188
+ * SwitchService serves switch related functions.
189
+ *
190
+ * @generated from service metalstack.infra.v2.SwitchService
191
+ */
192
+ export declare const SwitchService: GenService<{
193
+ /**
194
+ * Get a switch by ID.
195
+ *
196
+ * @generated from rpc metalstack.infra.v2.SwitchService.Get
197
+ */
198
+ get: {
199
+ methodKind: "unary";
200
+ input: typeof SwitchServiceGetRequestSchema;
201
+ output: typeof SwitchServiceGetResponseSchema;
202
+ };
203
+ /**
204
+ * Register a switch.
205
+ *
206
+ * @generated from rpc metalstack.infra.v2.SwitchService.Register
207
+ */
208
+ register: {
209
+ methodKind: "unary";
210
+ input: typeof SwitchServiceRegisterRequestSchema;
211
+ output: typeof SwitchServiceRegisterResponseSchema;
212
+ };
213
+ /**
214
+ * Heartbeat a switch.
215
+ *
216
+ * @generated from rpc metalstack.infra.v2.SwitchService.Heartbeat
217
+ */
218
+ heartbeat: {
219
+ methodKind: "unary";
220
+ input: typeof SwitchServiceHeartbeatRequestSchema;
221
+ output: typeof SwitchServiceHeartbeatResponseSchema;
222
+ };
223
+ }>;
@@ -0,0 +1,54 @@
1
+ // @generated by protoc-gen-es v2.10.2 with parameter "target=ts"
2
+ // @generated from file metalstack/infra/v2/switch.proto (package metalstack.infra.v2, syntax proto3)
3
+ /* eslint-disable */
4
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
5
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
6
+ import { file_google_protobuf_duration, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
+ import { file_metalstack_api_v2_common } from "../../api/v2/common_pb";
8
+ import { file_metalstack_api_v2_predefined_rules } from "../../api/v2/predefined_rules_pb";
9
+ import { file_metalstack_api_v2_switch } from "../../api/v2/switch_pb";
10
+ /**
11
+ * Describes the file metalstack/infra/v2/switch.proto.
12
+ */
13
+ export const file_metalstack_infra_v2_switch = /*@__PURE__*/ fileDesc("CiBtZXRhbHN0YWNrL2luZnJhL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5pbmZyYS52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkkKHFN3aXRjaFNlcnZpY2VSZWdpc3RlclJlcXVlc3QSKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkoKHVN3aXRjaFNlcnZpY2VSZWdpc3RlclJlc3BvbnNlEikKBnN3aXRjaBgBIAEoCzIZLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaCLzAwodU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QSGQoCaWQYASABKAlCDbpICnIIwLOusQIBaAESKwoIZHVyYXRpb24YAiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SEgoFZXJyb3IYAyABKAlIAIgBARJXCgtwb3J0X3N0YXRlcxgEIAMoCzJCLm1ldGFs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3dpdGNoU2VydmljZVJlZ2lzdGVyUmVxdWVzdBoyLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZVJlZ2lzdGVyUmVzcG9uc2UiCeDzGALq8xgBARJ/CglIZWFydGJlYXQSMi5tZXRhbHN0YWNrLmluZnJhLnYyLlN3aXRjaFNlcnZpY2VIZWFydGJlYXRSZXF1ZXN0GjMubWV0YWxzdGFjay5pbmZyYS52Mi5Td2l0Y2hTZXJ2aWNlSGVhcnRiZWF0UmVzcG9uc2UiCeDzGALq8xgBAULPAQoXY29tLm1ldGFsc3RhY2suaW5mcmEudjJCC1N3aXRjaFByb3RvUAFaOWdpdGh1Yi5jb20vbWV0YWwtc3RhY2svYXBpL2dvL21ldGFsc3RhY2svaW5mcmEvdjI7aW5mcmF2MqICA01JWKoCE01ldGFsc3RhY2suSW5mcmEuVjLKAhNNZXRhbHN0YWNrXEluZnJhXFYy4gIfTWV0YWxzdGFja1xJbmZyYVxWMlxHUEJNZXRhZGF0YeoCFU1ldGFsc3RhY2s6OkluZnJhOjpWMmIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_duration, file_google_protobuf_timestamp, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
14
+ /**
15
+ * Describes the message metalstack.infra.v2.SwitchServiceGetRequest.
16
+ * Use `create(SwitchServiceGetRequestSchema)` to create a new message.
17
+ */
18
+ export const SwitchServiceGetRequestSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 0);
19
+ /**
20
+ * Describes the message metalstack.infra.v2.SwitchServiceGetResponse.
21
+ * Use `create(SwitchServiceGetResponseSchema)` to create a new message.
22
+ */
23
+ export const SwitchServiceGetResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 1);
24
+ /**
25
+ * Describes the message metalstack.infra.v2.SwitchServiceRegisterRequest.
26
+ * Use `create(SwitchServiceRegisterRequestSchema)` to create a new message.
27
+ */
28
+ export const SwitchServiceRegisterRequestSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 2);
29
+ /**
30
+ * Describes the message metalstack.infra.v2.SwitchServiceRegisterResponse.
31
+ * Use `create(SwitchServiceRegisterResponseSchema)` to create a new message.
32
+ */
33
+ export const SwitchServiceRegisterResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 3);
34
+ /**
35
+ * Describes the message metalstack.infra.v2.SwitchServiceHeartbeatRequest.
36
+ * Use `create(SwitchServiceHeartbeatRequestSchema)` to create a new message.
37
+ */
38
+ export const SwitchServiceHeartbeatRequestSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 4);
39
+ /**
40
+ * Describes the message metalstack.infra.v2.SwitchServiceHeartbeatResponse.
41
+ * Use `create(SwitchServiceHeartbeatResponseSchema)` to create a new message.
42
+ */
43
+ export const SwitchServiceHeartbeatResponseSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 5);
44
+ /**
45
+ * Describes the message metalstack.infra.v2.SwitchSync.
46
+ * Use `create(SwitchSyncSchema)` to create a new message.
47
+ */
48
+ export const SwitchSyncSchema = /*@__PURE__*/ messageDesc(file_metalstack_infra_v2_switch, 6);
49
+ /**
50
+ * SwitchService serves switch related functions.
51
+ *
52
+ * @generated from service metalstack.infra.v2.SwitchService
53
+ */
54
+ export const SwitchService = /*@__PURE__*/ serviceDesc(file_metalstack_infra_v2_switch, 0);
@@ -0,0 +1,228 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file metalstack/infra/v2/switch.proto (package metalstack.infra.v2, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
8
+ import type { Duration } from "@bufbuild/protobuf/wkt";
9
+ import { file_google_protobuf_duration } from "@bufbuild/protobuf/wkt";
10
+ import { file_metalstack_api_v2_common } from "../../api/v2/common_pb";
11
+ import { file_metalstack_api_v2_predefined_rules } from "../../api/v2/predefined_rules_pb";
12
+ import type { Switch, SwitchBGPPortState, SwitchPortStatus, SwitchSync } from "../../api/v2/switch_pb";
13
+ import { file_metalstack_api_v2_switch } from "../../api/v2/switch_pb";
14
+ import type { Message } from "@bufbuild/protobuf";
15
+
16
+ /**
17
+ * Describes the file metalstack/infra/v2/switch.proto.
18
+ */
19
+ export const file_metalstack_infra_v2_switch: GenFile = /*@__PURE__*/
20
+ fileDesc("CiBtZXRhbHN0YWNrL2luZnJhL3YyL3N3aXRjaC5wcm90bxITbWV0YWxzdGFjay5pbmZyYS52MiI0ChdTd2l0Y2hTZXJ2aWNlR2V0UmVxdWVzdBIZCgJpZBgBIAEoCUINukgKcgjAs66xAgFoASJFChhTd2l0Y2hTZXJ2aWNlR2V0UmVzcG9uc2USKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkkKHFN3aXRjaFNlcnZpY2VSZWdpc3RlclJlcXVlc3QSKQoGc3dpdGNoGAEgASgLMhkubWV0YWxzdGFjay5hcGkudjIuU3dpdGNoIkoKHVN3aXRjaFNlcnZpY2VSZWdpc3RlclJlc3BvbnNlEikKBnN3aXRjaBgBIAEoCzIZLm1ldGFsc3RhY2suYXBpLnYyLlN3aXRjaCLzAwodU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QSGQoCaWQYASABKAlCDbpICnIIwLOusQIBaAESKwoIZHVyYXRpb24YAiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SEgoFZXJyb3IYAyABKAlIAIgBARJXCgtwb3J0X3N0YXRlcxgEIAMoCzJCLm1ldGFsc3RhY2suaW5mcmEudjIuU3dpdGNoU2VydmljZUhlYXJ0YmVhdFJlcXVlc3QuUG9ydFN0YXRlc0VudHJ5El4KD2JncF9wb3J0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ydGJlYXRSZXNwb25zZSIJ4PMYAurzGAEBQs8BChdjb20ubWV0YWxzdGFjay5pbmZyYS52MkILU3dpdGNoUHJvdG9QAVo5Z2l0aHViLmNvbS9tZXRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9pbmZyYS92MjtpbmZyYXYyogIDTUlYqgITTWV0YWxzdGFjay5JbmZyYS5WMsoCE01ldGFsc3RhY2tcSW5mcmFcVjLiAh9NZXRhbHN0YWNrXEluZnJhXFYyXEdQQk1ldGFkYXRh6gIVTWV0YWxzdGFjazo6SW5mcmE6OlYyYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_duration, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules, file_metalstack_api_v2_switch]);
21
+
22
+ /**
23
+ * SwitchServiceGetRequest.
24
+ *
25
+ * @generated from message metalstack.infra.v2.SwitchServiceGetRequest
26
+ */
27
+ export type SwitchServiceGetRequest = Message<"metalstack.infra.v2.SwitchServiceGetRequest"> & {
28
+ /**
29
+ * Id of the switch.
30
+ *
31
+ * @generated from field: string id = 1;
32
+ */
33
+ id: string;
34
+ };
35
+
36
+ /**
37
+ * Describes the message metalstack.infra.v2.SwitchServiceGetRequest.
38
+ * Use `create(SwitchServiceGetRequestSchema)` to create a new message.
39
+ */
40
+ export const SwitchServiceGetRequestSchema: GenMessage<SwitchServiceGetRequest> = /*@__PURE__*/
41
+ messageDesc(file_metalstack_infra_v2_switch, 0);
42
+
43
+ /**
44
+ * SwitchServiceGetResponse.
45
+ *
46
+ * @generated from message metalstack.infra.v2.SwitchServiceGetResponse
47
+ */
48
+ export type SwitchServiceGetResponse = Message<"metalstack.infra.v2.SwitchServiceGetResponse"> & {
49
+ /**
50
+ * Switch that was requested.
51
+ *
52
+ * @generated from field: metalstack.api.v2.Switch switch = 1;
53
+ */
54
+ switch?: Switch;
55
+ };
56
+
57
+ /**
58
+ * Describes the message metalstack.infra.v2.SwitchServiceGetResponse.
59
+ * Use `create(SwitchServiceGetResponseSchema)` to create a new message.
60
+ */
61
+ export const SwitchServiceGetResponseSchema: GenMessage<SwitchServiceGetResponse> = /*@__PURE__*/
62
+ messageDesc(file_metalstack_infra_v2_switch, 1);
63
+
64
+ /**
65
+ * SwitchServiceRegisterRequest.
66
+ *
67
+ * @generated from message metalstack.infra.v2.SwitchServiceRegisterRequest
68
+ */
69
+ export type SwitchServiceRegisterRequest = Message<"metalstack.infra.v2.SwitchServiceRegisterRequest"> & {
70
+ /**
71
+ * Switch to register.
72
+ *
73
+ * @generated from field: metalstack.api.v2.Switch switch = 1;
74
+ */
75
+ switch?: Switch;
76
+ };
77
+
78
+ /**
79
+ * Describes the message metalstack.infra.v2.SwitchServiceRegisterRequest.
80
+ * Use `create(SwitchServiceRegisterRequestSchema)` to create a new message.
81
+ */
82
+ export const SwitchServiceRegisterRequestSchema: GenMessage<SwitchServiceRegisterRequest> = /*@__PURE__*/
83
+ messageDesc(file_metalstack_infra_v2_switch, 2);
84
+
85
+ /**
86
+ * SwitchServiceRegisterResponse.
87
+ *
88
+ * @generated from message metalstack.infra.v2.SwitchServiceRegisterResponse
89
+ */
90
+ export type SwitchServiceRegisterResponse = Message<"metalstack.infra.v2.SwitchServiceRegisterResponse"> & {
91
+ /**
92
+ * Switch that was registered.
93
+ *
94
+ * @generated from field: metalstack.api.v2.Switch switch = 1;
95
+ */
96
+ switch?: Switch;
97
+ };
98
+
99
+ /**
100
+ * Describes the message metalstack.infra.v2.SwitchServiceRegisterResponse.
101
+ * Use `create(SwitchServiceRegisterResponseSchema)` to create a new message.
102
+ */
103
+ export const SwitchServiceRegisterResponseSchema: GenMessage<SwitchServiceRegisterResponse> = /*@__PURE__*/
104
+ messageDesc(file_metalstack_infra_v2_switch, 3);
105
+
106
+ /**
107
+ * SwitchServiceHeartbeatRequest.
108
+ *
109
+ * @generated from message metalstack.infra.v2.SwitchServiceHeartbeatRequest
110
+ */
111
+ export type SwitchServiceHeartbeatRequest = Message<"metalstack.infra.v2.SwitchServiceHeartbeatRequest"> & {
112
+ /**
113
+ * Id of the switch.
114
+ *
115
+ * @generated from field: string id = 1;
116
+ */
117
+ id: string;
118
+
119
+ /**
120
+ * Duration of the sync.
121
+ *
122
+ * @generated from field: google.protobuf.Duration duration = 2;
123
+ */
124
+ duration?: Duration;
125
+
126
+ /**
127
+ * Error if any occurred during the sync.
128
+ *
129
+ * @generated from field: optional string error = 3;
130
+ */
131
+ error?: string;
132
+
133
+ /**
134
+ * PortStates maps port identifiers to the respective port's operational state.
135
+ *
136
+ * @generated from field: map<string, metalstack.api.v2.SwitchPortStatus> port_states = 4;
137
+ */
138
+ portStates: { [key: string]: SwitchPortStatus };
139
+
140
+ /**
141
+ * BgpPortStates maps port identifiers to the respective port's BGP state.
142
+ *
143
+ * @generated from field: map<string, metalstack.api.v2.SwitchBGPPortState> bgp_port_states = 5;
144
+ */
145
+ bgpPortStates: { [key: string]: SwitchBGPPortState };
146
+ };
147
+
148
+ /**
149
+ * Describes the message metalstack.infra.v2.SwitchServiceHeartbeatRequest.
150
+ * Use `create(SwitchServiceHeartbeatRequestSchema)` to create a new message.
151
+ */
152
+ export const SwitchServiceHeartbeatRequestSchema: GenMessage<SwitchServiceHeartbeatRequest> = /*@__PURE__*/
153
+ messageDesc(file_metalstack_infra_v2_switch, 4);
154
+
155
+ /**
156
+ * SwitchServiceHeartbeatResponse.
157
+ *
158
+ * @generated from message metalstack.infra.v2.SwitchServiceHeartbeatResponse
159
+ */
160
+ export type SwitchServiceHeartbeatResponse = Message<"metalstack.infra.v2.SwitchServiceHeartbeatResponse"> & {
161
+ /**
162
+ * Id of the switch.
163
+ *
164
+ * @generated from field: string id = 1;
165
+ */
166
+ id: string;
167
+
168
+ /**
169
+ * LastSync holds information about the last sync.
170
+ *
171
+ * @generated from field: metalstack.api.v2.SwitchSync last_sync = 2;
172
+ */
173
+ lastSync?: SwitchSync;
174
+
175
+ /**
176
+ * LastSyncError holds information about the last erroneous sync.
177
+ *
178
+ * @generated from field: metalstack.api.v2.SwitchSync last_sync_error = 3;
179
+ */
180
+ lastSyncError?: SwitchSync;
181
+ };
182
+
183
+ /**
184
+ * Describes the message metalstack.infra.v2.SwitchServiceHeartbeatResponse.
185
+ * Use `create(SwitchServiceHeartbeatResponseSchema)` to create a new message.
186
+ */
187
+ export const SwitchServiceHeartbeatResponseSchema: GenMessage<SwitchServiceHeartbeatResponse> = /*@__PURE__*/
188
+ messageDesc(file_metalstack_infra_v2_switch, 5);
189
+
190
+ /**
191
+ * SwitchService serves switch related functions.
192
+ *
193
+ * @generated from service metalstack.infra.v2.SwitchService
194
+ */
195
+ export const SwitchService: GenService<{
196
+ /**
197
+ * Get a switch by ID.
198
+ *
199
+ * @generated from rpc metalstack.infra.v2.SwitchService.Get
200
+ */
201
+ get: {
202
+ methodKind: "unary";
203
+ input: typeof SwitchServiceGetRequestSchema;
204
+ output: typeof SwitchServiceGetResponseSchema;
205
+ },
206
+ /**
207
+ * Register a switch.
208
+ *
209
+ * @generated from rpc metalstack.infra.v2.SwitchService.Register
210
+ */
211
+ register: {
212
+ methodKind: "unary";
213
+ input: typeof SwitchServiceRegisterRequestSchema;
214
+ output: typeof SwitchServiceRegisterResponseSchema;
215
+ },
216
+ /**
217
+ * Heartbeat a switch.
218
+ *
219
+ * @generated from rpc metalstack.infra.v2.SwitchService.Heartbeat
220
+ */
221
+ heartbeat: {
222
+ methodKind: "unary";
223
+ input: typeof SwitchServiceHeartbeatRequestSchema;
224
+ output: typeof SwitchServiceHeartbeatResponseSchema;
225
+ },
226
+ }> = /*@__PURE__*/
227
+ serviceDesc(file_metalstack_infra_v2_switch, 0);
228
+
@@ -0,0 +1,70 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+
5
+ /* Basic Options */
6
+ // "incremental": true, /* Enable incremental compilation */
7
+ "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
+ "module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
+ // "lib": [], /* Specify library files to be included in the compilation. */
10
+ // "allowJs": true, /* Allow javascript files to be compiled. */
11
+ // "checkJs": true, /* Report errors in .js files. */
12
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
13
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
14
+ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15
+ // "sourceMap": true, /* Generates corresponding '.map' file. */
16
+ // "outFile": "./", /* Concatenate and emit output to single file. */
17
+ // "outDir": "./", /* Redirect output structure to the directory. */
18
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19
+ // "composite": true, /* Enable project compilation */
20
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21
+ // "removeComments": true, /* Do not emit comments to output. */
22
+ // "noEmit": true, /* Do not emit outputs. */
23
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
24
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
25
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26
+
27
+ /* Strict Type-Checking Options */
28
+ "strict": true, /* Enable all strict type-checking options. */
29
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30
+ // "strictNullChecks": true, /* Enable strict null checks. */
31
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
32
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
33
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
34
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
35
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
36
+
37
+ /* Additional Checks */
38
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
39
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
40
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
41
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
42
+ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
43
+
44
+ /* Module Resolution Options */
45
+ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ // "typeRoots": [], /* List of folders to include type definitions from. */
50
+ // "types": [], /* Type declaration files to be included in compilation. */
51
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
55
+
56
+ /* Source Map Options */
57
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
59
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
+
62
+ /* Experimental Options */
63
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
+
66
+ /* Advanced Options */
67
+ "skipLibCheck": true, /* Skip type checking of declaration files. */
68
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
69
+ }
70
+ }
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@metal-stack/api",
3
+ "description": "metal-stack api typescript client",
4
+ "repository": "https://github.com/metal-stack/api.git",
5
+ "scripts": {
6
+ "build": "tsc --project js/tsconfig.json",
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "MIT",
11
+ "type": "module",
12
+ "dependencies": {
13
+ "@bufbuild/protobuf": "^2.11.0",
14
+ "@connectrpc/connect-web": "^2.1.1"
15
+ },
16
+ "devDependencies": {
17
+ "typescript": "^5.9.3"
18
+ },
19
+ "files": ["js/*"],
20
+ "version": "0.0.40-beta.0"
21
+ }