@leavepulse/control-sdk 0.3.58 → 0.3.60

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/models.ts CHANGED
@@ -137,6 +137,9 @@ export type ImportDeviceTypesRequest =
137
137
  export type ImportDeviceTypesResponse =
138
138
  components["schemas"]["ImportDeviceTypesResponse"];
139
139
  export type ImportDocumentInput = components["schemas"]["ImportDocumentInput"];
140
+ export type IngressRuleDTO = components["schemas"]["IngressRuleDTO"];
141
+ export type IngressRuleListResponse =
142
+ components["schemas"]["IngressRuleListResponse"];
140
143
  export type InspectResponse = components["schemas"]["InspectResponse"];
141
144
  export type InstallExporterRequest =
142
145
  components["schemas"]["InstallExporterRequest"];
@@ -177,6 +180,8 @@ export type PowerCompatibilityResponse =
177
180
  export type PowerConnectionDTO = components["schemas"]["PowerConnectionDTO"];
178
181
  export type PowerConnectionListResponse =
179
182
  components["schemas"]["PowerConnectionListResponse"];
183
+ export type PowerDetailSchemaResponse =
184
+ components["schemas"]["PowerDetailSchemaResponse"];
180
185
  export type PowerFindingDTO = components["schemas"]["PowerFindingDTO"];
181
186
  export type PowerGroupDTO = components["schemas"]["PowerGroupDTO"];
182
187
  export type PowerGroupListResponse =
@@ -217,6 +222,8 @@ export type SetConnectorMatingRequest =
217
222
  components["schemas"]["SetConnectorMatingRequest"];
218
223
  export type SetDeviceTypePortsRequest =
219
224
  components["schemas"]["SetDeviceTypePortsRequest"];
225
+ export type SetEnrolPointRequest =
226
+ components["schemas"]["SetEnrolPointRequest"];
220
227
  export type SetEnvVarRequest = components["schemas"]["SetEnvVarRequest"];
221
228
  export type SetHostEndpointRequest =
222
229
  components["schemas"]["SetHostEndpointRequest"];
@@ -268,6 +275,8 @@ export type UpsertDnsRecordRequest =
268
275
  export type UpsertEdgeRequest = components["schemas"]["UpsertEdgeRequest"];
269
276
  export type UpsertEnvGroupRequest =
270
277
  components["schemas"]["UpsertEnvGroupRequest"];
278
+ export type UpsertIngressRuleRequest =
279
+ components["schemas"]["UpsertIngressRuleRequest"];
271
280
  export type UpsertManufacturerRequest =
272
281
  components["schemas"]["UpsertManufacturerRequest"];
273
282
  export type UpsertNodeRequest = components["schemas"]["UpsertNodeRequest"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leavepulse/control-sdk",
3
- "version": "0.3.58",
3
+ "version": "0.3.60",
4
4
  "description": "Generated resource SDK (@leavepulse/control-sdk).",
5
5
  "type": "module",
6
6
  "module": "index.ts",
@@ -35,6 +35,15 @@ export class ControlDcimPowerInterface extends Resource<Data> {
35
35
  );
36
36
  }
37
37
 
38
+ /** control.dcim.powerInterfaces.schema */
39
+ async controlDcimPowerInterfacesSchema(): Promise<models.PowerDetailSchemaResponse> {
40
+ return fetchCachedOrThrow<models.PowerDetailSchemaResponse>(
41
+ this.ctx.transport,
42
+ this.ctx.etagStore,
43
+ { method: "GET", path: `/v1/control/dcim/power-interfaces/schema` },
44
+ );
45
+ }
46
+
38
47
  /** control.dcim.powerInterfaces.upsert */
39
48
  async dcimPowerInterfacesUpsert(
40
49
  body: models.UpsertPowerInterfaceRequest,
@@ -1,5 +1,6 @@
1
1
  // Generated from the LeavePulse contract. Do not edit.
2
2
  import { Resource } from "../runtime/resource";
3
+ import { fetchCachedOrThrow } from "../runtime/etag-store";
3
4
  import type * as models from "../models";
4
5
  import type { ClientContext } from "../client";
5
6
 
@@ -13,6 +14,22 @@ export class ControlEdge extends Resource<Data> {
13
14
  super(data);
14
15
  }
15
16
 
17
+ /** control.graph.ingress.list */
18
+ async controlGraphIngressList(params?: {
19
+ node?: string;
20
+ hostname?: string;
21
+ }): Promise<models.IngressRuleListResponse> {
22
+ return fetchCachedOrThrow<models.IngressRuleListResponse>(
23
+ this.ctx.transport,
24
+ this.ctx.etagStore,
25
+ {
26
+ method: "GET",
27
+ path: `/v1/control/graph/ingress`,
28
+ query: { node: params?.node, hostname: params?.hostname },
29
+ },
30
+ );
31
+ }
32
+
16
33
  /** control.graph.edges.upsert */
17
34
  async graphEdgesUpsert(
18
35
  body: models.UpsertEdgeRequest,
@@ -40,4 +57,15 @@ export class ControlEdge extends Resource<Data> {
40
57
  path: `/v1/control/graph/edges/${this.id}/verify-egress`,
41
58
  });
42
59
  }
60
+
61
+ /** control.graph.ingress.upsert */
62
+ async graphIngressUpsert(
63
+ body: models.UpsertIngressRuleRequest,
64
+ ): Promise<models.IngressRuleDTO> {
65
+ return this.ctx.transport.request<models.IngressRuleDTO>({
66
+ method: "POST",
67
+ path: `/v1/control/graph/ingress`,
68
+ body,
69
+ });
70
+ }
43
71
  }
@@ -154,6 +154,17 @@ export class ControlHost extends Resource<Data> {
154
154
  });
155
155
  }
156
156
 
157
+ /** control.hosts.set_enrol_point */
158
+ async hostsSetEnrolPoint(
159
+ body: models.SetEnrolPointRequest,
160
+ ): Promise<models.HostDTO> {
161
+ return this.ctx.transport.request<models.HostDTO>({
162
+ method: "PATCH",
163
+ path: `/v1/control/hosts/${this.id}/enrol-point`,
164
+ body,
165
+ });
166
+ }
167
+
157
168
  /** control.hosts.install_exporter */
158
169
  async hostsInstallExporter(
159
170
  body: models.InstallExporterRequest,
package/types.ts CHANGED
@@ -1002,6 +1002,23 @@ export interface paths {
1002
1002
  patch?: never;
1003
1003
  trace?: never;
1004
1004
  };
1005
+ "/v1/control/dcim/power-interfaces/schema": {
1006
+ parameters: {
1007
+ query?: never;
1008
+ header?: never;
1009
+ path?: never;
1010
+ cookie?: never;
1011
+ };
1012
+ /** DetailSchema */
1013
+ get: operations["control.dcim.powerInterfaces.schema"];
1014
+ put?: never;
1015
+ post?: never;
1016
+ delete?: never;
1017
+ options?: never;
1018
+ head?: never;
1019
+ patch?: never;
1020
+ trace?: never;
1021
+ };
1005
1022
  "/v1/control/dcim/power-interfaces/set": {
1006
1023
  parameters: {
1007
1024
  query?: never;
@@ -1528,6 +1545,24 @@ export interface paths {
1528
1545
  patch?: never;
1529
1546
  trace?: never;
1530
1547
  };
1548
+ "/v1/control/graph/ingress": {
1549
+ parameters: {
1550
+ query?: never;
1551
+ header?: never;
1552
+ path?: never;
1553
+ cookie?: never;
1554
+ };
1555
+ /** ListIngress */
1556
+ get: operations["control.graph.ingress.list"];
1557
+ put?: never;
1558
+ /** UpsertIngress */
1559
+ post: operations["control.graph.ingress.upsert"];
1560
+ delete?: never;
1561
+ options?: never;
1562
+ head?: never;
1563
+ patch?: never;
1564
+ trace?: never;
1565
+ };
1531
1566
  "/v1/control/graph/nodes": {
1532
1567
  parameters: {
1533
1568
  query?: never;
@@ -1768,6 +1803,23 @@ export interface paths {
1768
1803
  patch: operations["control.hosts.set_endpoint"];
1769
1804
  trace?: never;
1770
1805
  };
1806
+ "/v1/control/hosts/{host_id}/enrol-point": {
1807
+ parameters: {
1808
+ query?: never;
1809
+ header?: never;
1810
+ path?: never;
1811
+ cookie?: never;
1812
+ };
1813
+ get?: never;
1814
+ put?: never;
1815
+ post?: never;
1816
+ delete?: never;
1817
+ options?: never;
1818
+ head?: never;
1819
+ /** Let this host take first contact from unenrolled machines */
1820
+ patch: operations["control.hosts.set_enrol_point"];
1821
+ trace?: never;
1822
+ };
1771
1823
  "/v1/control/hosts/{host_id}/exporters": {
1772
1824
  parameters: {
1773
1825
  query?: never;
@@ -2609,6 +2661,8 @@ export interface components {
2609
2661
  };
2610
2662
  /** DeviceTypeDTO */
2611
2663
  DeviceTypeDTO: {
2664
+ /** @default */
2665
+ build_format: string;
2612
2666
  depth_mm: number;
2613
2667
  /** @default */
2614
2668
  front_image_url: string;
@@ -2855,7 +2909,13 @@ export interface components {
2855
2909
  /** @default */
2856
2910
  kernel: string;
2857
2911
  /** @default false */
2912
+ kvm: boolean;
2913
+ /** @default false */
2858
2914
  nftables: boolean;
2915
+ /** @default false */
2916
+ nginx: boolean;
2917
+ /** @default [] */
2918
+ nginx_modules: string[];
2859
2919
  /** @default */
2860
2920
  os: string;
2861
2921
  /** @default false */
@@ -2863,11 +2923,15 @@ export interface components {
2863
2923
  };
2864
2924
  /** HostDTO */
2865
2925
  HostDTO: {
2926
+ /** @default false */
2927
+ accepts_enrolment: boolean;
2866
2928
  agent_version: string;
2867
2929
  capabilities: components["schemas"]["HostCapabilitiesDTO"];
2868
2930
  containers: components["schemas"]["ContainerDTO"][];
2869
2931
  disks: components["schemas"]["DiskUsageDTO"][];
2870
2932
  display_name: string;
2933
+ /** @default */
2934
+ enrol_base_url: string;
2871
2935
  exporters: components["schemas"]["DetectedExporterDTO"][];
2872
2936
  host_id: string;
2873
2937
  hostname: string;
@@ -2879,7 +2943,11 @@ export interface components {
2879
2943
  slug: string;
2880
2944
  tags: string[];
2881
2945
  /** @default */
2946
+ wg_candidate_state: string;
2947
+ /** @default */
2882
2948
  wg_endpoint: string;
2949
+ /** @default */
2950
+ wg_endpoint_candidate: string;
2883
2951
  };
2884
2952
  /** HostListResponse */
2885
2953
  HostListResponse: {
@@ -2925,6 +2993,42 @@ export interface components {
2925
2993
  source_ref: string;
2926
2994
  yaml: string;
2927
2995
  };
2996
+ /** IngressRuleDTO */
2997
+ IngressRuleDTO: {
2998
+ /** @default false */
2999
+ deny: boolean;
3000
+ edge_holder_id: string;
3001
+ /** @default true */
3002
+ enabled: boolean;
3003
+ /** @default false */
3004
+ grpc: boolean;
3005
+ hostname: string;
3006
+ id: string;
3007
+ /** @default 0 */
3008
+ max_body_mb: number;
3009
+ /** @default */
3010
+ notes: string;
3011
+ /** @default */
3012
+ origin_id: string;
3013
+ /** @default address */
3014
+ origin_kind: string;
3015
+ /** @default */
3016
+ path: string;
3017
+ /** @default */
3018
+ path_regex: string;
3019
+ /** @default */
3020
+ rewrite_target: string;
3021
+ /** @default */
3022
+ upstream: string;
3023
+ /** @default http */
3024
+ upstream_scheme: string;
3025
+ /** @default false */
3026
+ websocket: boolean;
3027
+ };
3028
+ /** IngressRuleListResponse */
3029
+ IngressRuleListResponse: {
3030
+ items: components["schemas"]["IngressRuleDTO"][];
3031
+ };
2928
3032
  /** InspectResponse */
2929
3033
  InspectResponse: {
2930
3034
  container: string;
@@ -3184,6 +3288,13 @@ export interface components {
3184
3288
  PowerConnectionListResponse: {
3185
3289
  items: components["schemas"]["PowerConnectionDTO"][];
3186
3290
  };
3291
+ /** PowerDetailSchemaResponse */
3292
+ PowerDetailSchemaResponse: {
3293
+ by_connection_type: {
3294
+ [key: string]: string[];
3295
+ };
3296
+ common: string[];
3297
+ };
3187
3298
  /** PowerFindingDTO */
3188
3299
  PowerFindingDTO: {
3189
3300
  code: string;
@@ -3295,6 +3406,10 @@ export interface components {
3295
3406
  };
3296
3407
  /** PowerInterfaceListResponse */
3297
3408
  PowerInterfaceListResponse: {
3409
+ /** @default */
3410
+ build_format: string;
3411
+ /** @default */
3412
+ from_device_type_id: string;
3298
3413
  items: components["schemas"]["PowerInterfaceDTO"][];
3299
3414
  };
3300
3415
  /** PowerLinkDTO */
@@ -3450,6 +3565,8 @@ export interface components {
3450
3565
  requires?: Record<string, never>[];
3451
3566
  spec?: components["schemas"]["ServiceSpec"] | null;
3452
3567
  stack: string;
3568
+ /** @default false */
3569
+ swap_abandoned: boolean;
3453
3570
  target_hosts: string[];
3454
3571
  target_tags: string[];
3455
3572
  /** @default false */
@@ -3512,6 +3629,12 @@ export interface components {
3512
3629
  SetDeviceTypePortsRequest: {
3513
3630
  ports: components["schemas"]["DeviceTypePortInput"][];
3514
3631
  };
3632
+ /** SetEnrolPointRequest */
3633
+ SetEnrolPointRequest: {
3634
+ accepts_enrolment: boolean;
3635
+ /** @default */
3636
+ enrol_base_url?: string;
3637
+ };
3515
3638
  /** SetEnvVarRequest */
3516
3639
  SetEnvVarRequest: {
3517
3640
  kind?: string | null;
@@ -3784,6 +3907,8 @@ export interface components {
3784
3907
  };
3785
3908
  /** UpsertDeviceTypeRequest */
3786
3909
  UpsertDeviceTypeRequest: {
3910
+ /** @default */
3911
+ build_format?: string;
3787
3912
  /** @default 0 */
3788
3913
  depth_mm?: number;
3789
3914
  /** @default */
@@ -3860,6 +3985,26 @@ export interface components {
3860
3985
  /** @default */
3861
3986
  name?: string;
3862
3987
  };
3988
+ /** UpsertIngressRuleRequest */
3989
+ UpsertIngressRuleRequest: {
3990
+ deny?: boolean | null;
3991
+ edge_holder_id: string;
3992
+ enabled?: boolean | null;
3993
+ grpc?: boolean | null;
3994
+ hostname: string;
3995
+ /** @default */
3996
+ id?: string;
3997
+ max_body_mb?: number | null;
3998
+ notes?: string | null;
3999
+ origin_id?: string | null;
4000
+ origin_kind?: string | null;
4001
+ path?: string | null;
4002
+ path_regex?: string | null;
4003
+ rewrite_target?: string | null;
4004
+ upstream?: string | null;
4005
+ upstream_scheme?: string | null;
4006
+ websocket?: boolean | null;
4007
+ };
3863
4008
  /** UpsertManufacturerRequest */
3864
4009
  UpsertManufacturerRequest: {
3865
4010
  /** @default */
@@ -3925,7 +4070,7 @@ export interface components {
3925
4070
  config_files?: components["schemas"]["ConfigFileDTO"][] | null;
3926
4071
  /** @default latest */
3927
4072
  default_tag?: string;
3928
- depends_on?: string[];
4073
+ depends_on?: string[] | null;
3929
4074
  env?: {
3930
4075
  [key: string]: string;
3931
4076
  } | null;
@@ -3942,13 +4087,13 @@ export interface components {
3942
4087
  /** @default service */
3943
4088
  kind?: string;
3944
4089
  name: string;
3945
- provides?: string[];
4090
+ provides?: string[] | null;
3946
4091
  requires?: Record<string, never>[] | null;
3947
4092
  spec?: components["schemas"]["ServiceSpec"] | null;
3948
4093
  /** @default */
3949
4094
  stack?: string;
3950
- target_hosts?: string[];
3951
- target_tags?: string[];
4095
+ target_hosts?: string[] | null;
4096
+ target_tags?: string[] | null;
3952
4097
  };
3953
4098
  /** VerifyAcceptanceItemInput */
3954
4099
  VerifyAcceptanceItemInput: {
@@ -7561,6 +7706,26 @@ export interface operations {
7561
7706
  };
7562
7707
  };
7563
7708
  };
7709
+ "control.dcim.powerInterfaces.schema": {
7710
+ parameters: {
7711
+ query?: never;
7712
+ header?: never;
7713
+ path?: never;
7714
+ cookie?: never;
7715
+ };
7716
+ requestBody?: never;
7717
+ responses: {
7718
+ /** @description Request fulfilled, document follows */
7719
+ 200: {
7720
+ headers: {
7721
+ [name: string]: unknown;
7722
+ };
7723
+ content: {
7724
+ "application/json": components["schemas"]["PowerDetailSchemaResponse"];
7725
+ };
7726
+ };
7727
+ };
7728
+ };
7564
7729
  "control.dcim.powerInterfaces.set": {
7565
7730
  parameters: {
7566
7731
  query?: never;
@@ -9412,6 +9577,89 @@ export interface operations {
9412
9577
  };
9413
9578
  };
9414
9579
  };
9580
+ "control.graph.ingress.list": {
9581
+ parameters: {
9582
+ query?: {
9583
+ node?: string;
9584
+ hostname?: string;
9585
+ };
9586
+ header?: never;
9587
+ path?: never;
9588
+ cookie?: never;
9589
+ };
9590
+ requestBody?: never;
9591
+ responses: {
9592
+ /** @description Request fulfilled, document follows */
9593
+ 200: {
9594
+ headers: {
9595
+ [name: string]: unknown;
9596
+ };
9597
+ content: {
9598
+ "application/json": components["schemas"]["IngressRuleListResponse"];
9599
+ };
9600
+ };
9601
+ /** @description Bad request syntax or unsupported method */
9602
+ 400: {
9603
+ headers: {
9604
+ [name: string]: unknown;
9605
+ };
9606
+ content: {
9607
+ "application/json": {
9608
+ detail: string;
9609
+ extra?:
9610
+ | null
9611
+ | {
9612
+ [key: string]: unknown;
9613
+ }
9614
+ | unknown[];
9615
+ status_code: number;
9616
+ };
9617
+ };
9618
+ };
9619
+ };
9620
+ };
9621
+ "control.graph.ingress.upsert": {
9622
+ parameters: {
9623
+ query?: never;
9624
+ header?: never;
9625
+ path?: never;
9626
+ cookie?: never;
9627
+ };
9628
+ requestBody: {
9629
+ content: {
9630
+ "application/json": components["schemas"]["UpsertIngressRuleRequest"];
9631
+ };
9632
+ };
9633
+ responses: {
9634
+ /** @description Document created, URL follows */
9635
+ 201: {
9636
+ headers: {
9637
+ [name: string]: unknown;
9638
+ };
9639
+ content: {
9640
+ "application/json": components["schemas"]["IngressRuleDTO"];
9641
+ };
9642
+ };
9643
+ /** @description Bad request syntax or unsupported method */
9644
+ 400: {
9645
+ headers: {
9646
+ [name: string]: unknown;
9647
+ };
9648
+ content: {
9649
+ "application/json": {
9650
+ detail: string;
9651
+ extra?:
9652
+ | null
9653
+ | {
9654
+ [key: string]: unknown;
9655
+ }
9656
+ | unknown[];
9657
+ status_code: number;
9658
+ };
9659
+ };
9660
+ };
9661
+ };
9662
+ };
9415
9663
  "control.graph.nodes.upsert": {
9416
9664
  parameters: {
9417
9665
  query?: never;
@@ -10067,6 +10315,50 @@ export interface operations {
10067
10315
  };
10068
10316
  };
10069
10317
  };
10318
+ "control.hosts.set_enrol_point": {
10319
+ parameters: {
10320
+ query?: never;
10321
+ header?: never;
10322
+ path: {
10323
+ host_id: string;
10324
+ };
10325
+ cookie?: never;
10326
+ };
10327
+ requestBody: {
10328
+ content: {
10329
+ "application/json": components["schemas"]["SetEnrolPointRequest"];
10330
+ };
10331
+ };
10332
+ responses: {
10333
+ /** @description Request fulfilled, document follows */
10334
+ 200: {
10335
+ headers: {
10336
+ [name: string]: unknown;
10337
+ };
10338
+ content: {
10339
+ "application/json": components["schemas"]["HostDTO"];
10340
+ };
10341
+ };
10342
+ /** @description Bad request syntax or unsupported method */
10343
+ 400: {
10344
+ headers: {
10345
+ [name: string]: unknown;
10346
+ };
10347
+ content: {
10348
+ "application/json": {
10349
+ detail: string;
10350
+ extra?:
10351
+ | null
10352
+ | {
10353
+ [key: string]: unknown;
10354
+ }
10355
+ | unknown[];
10356
+ status_code: number;
10357
+ };
10358
+ };
10359
+ };
10360
+ };
10361
+ };
10070
10362
  "control.hosts.install_exporter": {
10071
10363
  parameters: {
10072
10364
  query?: never;