@leavepulse/control-sdk 0.3.44 → 0.3.45
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/client.ts +10 -0
- package/index.ts +1 -0
- package/models.ts +3 -0
- package/package.json +1 -1
- package/resources/ControlDcimPhoto.ts +43 -0
- package/types.ts +192 -5
package/client.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { ControlDcimLocation } from "./resources/ControlDcimLocation";
|
|
|
21
21
|
import { ControlDcimManufacturer } from "./resources/ControlDcimManufacturer";
|
|
22
22
|
import { ControlDcimOutlet } from "./resources/ControlDcimOutlet";
|
|
23
23
|
import { ControlDcimPdu } from "./resources/ControlDcimPdu";
|
|
24
|
+
import { ControlDcimPhoto } from "./resources/ControlDcimPhoto";
|
|
24
25
|
import { ControlDcimPort } from "./resources/ControlDcimPort";
|
|
25
26
|
import { ControlDcimPowerLink } from "./resources/ControlDcimPowerLink";
|
|
26
27
|
import { ControlDcimRack } from "./resources/ControlDcimRack";
|
|
@@ -197,6 +198,14 @@ export class LeavePulse {
|
|
|
197
198
|
) as ControlDcimPdu;
|
|
198
199
|
}
|
|
199
200
|
|
|
201
|
+
controldcimphoto(id: string): ControlDcimPhoto {
|
|
202
|
+
return this.ctx.cache.ensure(
|
|
203
|
+
"ControlDcimPhoto",
|
|
204
|
+
id,
|
|
205
|
+
() => new ControlDcimPhoto({ id } as never, this.ctx),
|
|
206
|
+
) as ControlDcimPhoto;
|
|
207
|
+
}
|
|
208
|
+
|
|
200
209
|
controldcimport(id: string): ControlDcimPort {
|
|
201
210
|
return this.ctx.cache.ensure(
|
|
202
211
|
"ControlDcimPort",
|
|
@@ -335,6 +344,7 @@ export class LeavePulse {
|
|
|
335
344
|
new ControlDcimManufacturer(d as never, this.ctx),
|
|
336
345
|
ControlDcimOutlet: (d) => new ControlDcimOutlet(d as never, this.ctx),
|
|
337
346
|
ControlDcimPdu: (d) => new ControlDcimPdu(d as never, this.ctx),
|
|
347
|
+
ControlDcimPhoto: (d) => new ControlDcimPhoto(d as never, this.ctx),
|
|
338
348
|
ControlDcimPort: (d) => new ControlDcimPort(d as never, this.ctx),
|
|
339
349
|
ControlDcimPowerLink: (d) =>
|
|
340
350
|
new ControlDcimPowerLink(d as never, this.ctx),
|
package/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { ControlDcimLocation } from "./resources/ControlDcimLocation";
|
|
|
17
17
|
export { ControlDcimManufacturer } from "./resources/ControlDcimManufacturer";
|
|
18
18
|
export { ControlDcimOutlet } from "./resources/ControlDcimOutlet";
|
|
19
19
|
export { ControlDcimPdu } from "./resources/ControlDcimPdu";
|
|
20
|
+
export { ControlDcimPhoto } from "./resources/ControlDcimPhoto";
|
|
20
21
|
export { ControlDcimPort } from "./resources/ControlDcimPort";
|
|
21
22
|
export { ControlDcimPowerLink } from "./resources/ControlDcimPowerLink";
|
|
22
23
|
export { ControlDcimRack } from "./resources/ControlDcimRack";
|
package/models.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type AcceptanceItemInput = components["schemas"]["AcceptanceItemInput"];
|
|
|
9
9
|
export type AcceptanceRecordDTO = components["schemas"]["AcceptanceRecordDTO"];
|
|
10
10
|
export type AcceptanceRecordListResponse =
|
|
11
11
|
components["schemas"]["AcceptanceRecordListResponse"];
|
|
12
|
+
export type AddPhotoRequest = components["schemas"]["AddPhotoRequest"];
|
|
12
13
|
export type AffectedDeviceDTO = components["schemas"]["AffectedDeviceDTO"];
|
|
13
14
|
export type AgentReleaseDTO = components["schemas"]["AgentReleaseDTO"];
|
|
14
15
|
export type AlertDTO = components["schemas"]["AlertDTO"];
|
|
@@ -153,6 +154,7 @@ export type PanelDTO = components["schemas"]["PanelDTO"];
|
|
|
153
154
|
export type PathHopDTO = components["schemas"]["PathHopDTO"];
|
|
154
155
|
export type PduDTO = components["schemas"]["PduDTO"];
|
|
155
156
|
export type PduListResponse = components["schemas"]["PduListResponse"];
|
|
157
|
+
export type PhotoDTO = components["schemas"]["PhotoDTO"];
|
|
156
158
|
export type PlacementDTO = components["schemas"]["PlacementDTO"];
|
|
157
159
|
export type PlacementInput = components["schemas"]["PlacementInput"];
|
|
158
160
|
export type PortCheckRequest = components["schemas"]["PortCheckRequest"];
|
|
@@ -220,6 +222,7 @@ export type UpdateLocationRequest =
|
|
|
220
222
|
components["schemas"]["UpdateLocationRequest"];
|
|
221
223
|
export type UpdateOutletRequest = components["schemas"]["UpdateOutletRequest"];
|
|
222
224
|
export type UpdatePduRequest = components["schemas"]["UpdatePduRequest"];
|
|
225
|
+
export type UpdatePhotoRequest = components["schemas"]["UpdatePhotoRequest"];
|
|
223
226
|
export type UpdatePortRequest = components["schemas"]["UpdatePortRequest"];
|
|
224
227
|
export type UpdateRackRequest = components["schemas"]["UpdateRackRequest"];
|
|
225
228
|
export type UpdateStorageNodeRequest =
|
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Generated from the LeavePulse contract. Do not edit.
|
|
2
|
+
import { Resource } from "../runtime/resource";
|
|
3
|
+
import type * as models from "../models";
|
|
4
|
+
import type { ClientContext } from "../client";
|
|
5
|
+
|
|
6
|
+
type Data = { id: string | number } & Record<string, unknown>;
|
|
7
|
+
|
|
8
|
+
export class ControlDcimPhoto extends Resource<Data> {
|
|
9
|
+
constructor(
|
|
10
|
+
data: Data,
|
|
11
|
+
private readonly ctx: ClientContext,
|
|
12
|
+
) {
|
|
13
|
+
super(data);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** control.dcim.photos.add */
|
|
17
|
+
async dcimPhotosAdd(body: models.AddPhotoRequest): Promise<models.PhotoDTO> {
|
|
18
|
+
return this.ctx.transport.request<models.PhotoDTO>({
|
|
19
|
+
method: "POST",
|
|
20
|
+
path: `/v1/control/dcim/photos`,
|
|
21
|
+
body,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** control.dcim.photos.delete */
|
|
26
|
+
async dcimPhotosDelete(): Promise<models.DeleteResultDTO> {
|
|
27
|
+
return this.ctx.transport.request<models.DeleteResultDTO>({
|
|
28
|
+
method: "DELETE",
|
|
29
|
+
path: `/v1/control/dcim/photos/${this.id}`,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** control.dcim.photos.update */
|
|
34
|
+
async dcimPhotosUpdate(
|
|
35
|
+
body: models.UpdatePhotoRequest,
|
|
36
|
+
): Promise<models.PhotoDTO> {
|
|
37
|
+
return this.ctx.transport.request<models.PhotoDTO>({
|
|
38
|
+
method: "PATCH",
|
|
39
|
+
path: `/v1/control/dcim/photos/${this.id}`,
|
|
40
|
+
body,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
package/types.ts
CHANGED
|
@@ -739,6 +739,41 @@ export interface paths {
|
|
|
739
739
|
patch: operations["control.dcim.locations.update"];
|
|
740
740
|
trace?: never;
|
|
741
741
|
};
|
|
742
|
+
"/v1/control/dcim/photos": {
|
|
743
|
+
parameters: {
|
|
744
|
+
query?: never;
|
|
745
|
+
header?: never;
|
|
746
|
+
path?: never;
|
|
747
|
+
cookie?: never;
|
|
748
|
+
};
|
|
749
|
+
get?: never;
|
|
750
|
+
put?: never;
|
|
751
|
+
/** AddPhoto */
|
|
752
|
+
post: operations["control.dcim.photos.add"];
|
|
753
|
+
delete?: never;
|
|
754
|
+
options?: never;
|
|
755
|
+
head?: never;
|
|
756
|
+
patch?: never;
|
|
757
|
+
trace?: never;
|
|
758
|
+
};
|
|
759
|
+
"/v1/control/dcim/photos/{photo_id}": {
|
|
760
|
+
parameters: {
|
|
761
|
+
query?: never;
|
|
762
|
+
header?: never;
|
|
763
|
+
path?: never;
|
|
764
|
+
cookie?: never;
|
|
765
|
+
};
|
|
766
|
+
get?: never;
|
|
767
|
+
put?: never;
|
|
768
|
+
post?: never;
|
|
769
|
+
/** DeletePhoto */
|
|
770
|
+
delete: operations["control.dcim.photos.delete"];
|
|
771
|
+
options?: never;
|
|
772
|
+
head?: never;
|
|
773
|
+
/** UpdatePhoto */
|
|
774
|
+
patch: operations["control.dcim.photos.update"];
|
|
775
|
+
trace?: never;
|
|
776
|
+
};
|
|
742
777
|
"/v1/control/dcim/ports": {
|
|
743
778
|
parameters: {
|
|
744
779
|
query?: never;
|
|
@@ -1801,6 +1836,18 @@ export interface components {
|
|
|
1801
1836
|
AcceptanceRecordListResponse: {
|
|
1802
1837
|
items: components["schemas"]["AcceptanceRecordDTO"][];
|
|
1803
1838
|
};
|
|
1839
|
+
/** AddPhotoRequest */
|
|
1840
|
+
AddPhotoRequest: {
|
|
1841
|
+
/** @default */
|
|
1842
|
+
caption?: string;
|
|
1843
|
+
media_key: string;
|
|
1844
|
+
/** @default 0 */
|
|
1845
|
+
position?: number;
|
|
1846
|
+
/** @default */
|
|
1847
|
+
role?: string;
|
|
1848
|
+
subject_id: string;
|
|
1849
|
+
subject_kind: string;
|
|
1850
|
+
};
|
|
1804
1851
|
/** AffectedDeviceDTO */
|
|
1805
1852
|
AffectedDeviceDTO: {
|
|
1806
1853
|
asset_tag: string;
|
|
@@ -1855,6 +1902,7 @@ export interface components {
|
|
|
1855
1902
|
id: string;
|
|
1856
1903
|
length_m: number;
|
|
1857
1904
|
owner?: components["schemas"]["OwnerDTO"] | null;
|
|
1905
|
+
photos?: components["schemas"]["PhotoDTO"][];
|
|
1858
1906
|
spec_json: string;
|
|
1859
1907
|
terminals?: components["schemas"]["CableTerminalDTO"][];
|
|
1860
1908
|
type: string;
|
|
@@ -2265,6 +2313,7 @@ export interface components {
|
|
|
2265
2313
|
kind: string;
|
|
2266
2314
|
model: string;
|
|
2267
2315
|
owner?: components["schemas"]["OwnerDTO"] | null;
|
|
2316
|
+
photos?: components["schemas"]["PhotoDTO"][];
|
|
2268
2317
|
placement?: components["schemas"]["PlacementDTO"] | null;
|
|
2269
2318
|
serial: string;
|
|
2270
2319
|
};
|
|
@@ -2735,6 +2784,14 @@ export interface components {
|
|
|
2735
2784
|
PduListResponse: {
|
|
2736
2785
|
items: components["schemas"]["PduDTO"][];
|
|
2737
2786
|
};
|
|
2787
|
+
/** PhotoDTO */
|
|
2788
|
+
PhotoDTO: {
|
|
2789
|
+
caption: string;
|
|
2790
|
+
id: string;
|
|
2791
|
+
position: number;
|
|
2792
|
+
role: string;
|
|
2793
|
+
url: string;
|
|
2794
|
+
};
|
|
2738
2795
|
/** PlacementDTO */
|
|
2739
2796
|
PlacementDTO: {
|
|
2740
2797
|
address: string;
|
|
@@ -3185,6 +3242,12 @@ export interface components {
|
|
|
3185
3242
|
UpdatePduRequest: {
|
|
3186
3243
|
feed_id?: string | null;
|
|
3187
3244
|
};
|
|
3245
|
+
/** UpdatePhotoRequest */
|
|
3246
|
+
UpdatePhotoRequest: {
|
|
3247
|
+
caption?: string | null;
|
|
3248
|
+
position?: number | null;
|
|
3249
|
+
role?: string | null;
|
|
3250
|
+
};
|
|
3188
3251
|
/** UpdatePortRequest */
|
|
3189
3252
|
UpdatePortRequest: {
|
|
3190
3253
|
kind?: string | null;
|
|
@@ -3360,10 +3423,8 @@ export interface components {
|
|
|
3360
3423
|
[key: string]: Record<string, never>;
|
|
3361
3424
|
} | null;
|
|
3362
3425
|
exported_keys?: string[] | null;
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
/** @default 0 */
|
|
3366
|
-
health_port?: number;
|
|
3426
|
+
health_path?: string | null;
|
|
3427
|
+
health_port?: number | null;
|
|
3367
3428
|
/** @default 120 */
|
|
3368
3429
|
health_timeout_seconds?: number;
|
|
3369
3430
|
image_ref: string;
|
|
@@ -3371,7 +3432,7 @@ export interface components {
|
|
|
3371
3432
|
kind?: string;
|
|
3372
3433
|
name: string;
|
|
3373
3434
|
provides?: string[];
|
|
3374
|
-
requires?: Record<string, never>[];
|
|
3435
|
+
requires?: Record<string, never>[] | null;
|
|
3375
3436
|
spec?: components["schemas"]["ServiceSpec"] | null;
|
|
3376
3437
|
/** @default */
|
|
3377
3438
|
stack?: string;
|
|
@@ -6049,6 +6110,132 @@ export interface operations {
|
|
|
6049
6110
|
};
|
|
6050
6111
|
};
|
|
6051
6112
|
};
|
|
6113
|
+
"control.dcim.photos.add": {
|
|
6114
|
+
parameters: {
|
|
6115
|
+
query?: never;
|
|
6116
|
+
header?: never;
|
|
6117
|
+
path?: never;
|
|
6118
|
+
cookie?: never;
|
|
6119
|
+
};
|
|
6120
|
+
requestBody: {
|
|
6121
|
+
content: {
|
|
6122
|
+
"application/json": components["schemas"]["AddPhotoRequest"];
|
|
6123
|
+
};
|
|
6124
|
+
};
|
|
6125
|
+
responses: {
|
|
6126
|
+
/** @description Document created, URL follows */
|
|
6127
|
+
201: {
|
|
6128
|
+
headers: {
|
|
6129
|
+
[name: string]: unknown;
|
|
6130
|
+
};
|
|
6131
|
+
content: {
|
|
6132
|
+
"application/json": components["schemas"]["PhotoDTO"];
|
|
6133
|
+
};
|
|
6134
|
+
};
|
|
6135
|
+
/** @description Bad request syntax or unsupported method */
|
|
6136
|
+
400: {
|
|
6137
|
+
headers: {
|
|
6138
|
+
[name: string]: unknown;
|
|
6139
|
+
};
|
|
6140
|
+
content: {
|
|
6141
|
+
"application/json": {
|
|
6142
|
+
detail: string;
|
|
6143
|
+
extra?:
|
|
6144
|
+
| null
|
|
6145
|
+
| {
|
|
6146
|
+
[key: string]: unknown;
|
|
6147
|
+
}
|
|
6148
|
+
| unknown[];
|
|
6149
|
+
status_code: number;
|
|
6150
|
+
};
|
|
6151
|
+
};
|
|
6152
|
+
};
|
|
6153
|
+
};
|
|
6154
|
+
};
|
|
6155
|
+
"control.dcim.photos.delete": {
|
|
6156
|
+
parameters: {
|
|
6157
|
+
query?: never;
|
|
6158
|
+
header?: never;
|
|
6159
|
+
path: {
|
|
6160
|
+
photo_id: string;
|
|
6161
|
+
};
|
|
6162
|
+
cookie?: never;
|
|
6163
|
+
};
|
|
6164
|
+
requestBody?: never;
|
|
6165
|
+
responses: {
|
|
6166
|
+
/** @description Request fulfilled, document follows */
|
|
6167
|
+
200: {
|
|
6168
|
+
headers: {
|
|
6169
|
+
[name: string]: unknown;
|
|
6170
|
+
};
|
|
6171
|
+
content: {
|
|
6172
|
+
"application/json": components["schemas"]["DeleteResultDTO"];
|
|
6173
|
+
};
|
|
6174
|
+
};
|
|
6175
|
+
/** @description Bad request syntax or unsupported method */
|
|
6176
|
+
400: {
|
|
6177
|
+
headers: {
|
|
6178
|
+
[name: string]: unknown;
|
|
6179
|
+
};
|
|
6180
|
+
content: {
|
|
6181
|
+
"application/json": {
|
|
6182
|
+
detail: string;
|
|
6183
|
+
extra?:
|
|
6184
|
+
| null
|
|
6185
|
+
| {
|
|
6186
|
+
[key: string]: unknown;
|
|
6187
|
+
}
|
|
6188
|
+
| unknown[];
|
|
6189
|
+
status_code: number;
|
|
6190
|
+
};
|
|
6191
|
+
};
|
|
6192
|
+
};
|
|
6193
|
+
};
|
|
6194
|
+
};
|
|
6195
|
+
"control.dcim.photos.update": {
|
|
6196
|
+
parameters: {
|
|
6197
|
+
query?: never;
|
|
6198
|
+
header?: never;
|
|
6199
|
+
path: {
|
|
6200
|
+
photo_id: string;
|
|
6201
|
+
};
|
|
6202
|
+
cookie?: never;
|
|
6203
|
+
};
|
|
6204
|
+
requestBody: {
|
|
6205
|
+
content: {
|
|
6206
|
+
"application/json": components["schemas"]["UpdatePhotoRequest"];
|
|
6207
|
+
};
|
|
6208
|
+
};
|
|
6209
|
+
responses: {
|
|
6210
|
+
/** @description Request fulfilled, document follows */
|
|
6211
|
+
200: {
|
|
6212
|
+
headers: {
|
|
6213
|
+
[name: string]: unknown;
|
|
6214
|
+
};
|
|
6215
|
+
content: {
|
|
6216
|
+
"application/json": components["schemas"]["PhotoDTO"];
|
|
6217
|
+
};
|
|
6218
|
+
};
|
|
6219
|
+
/** @description Bad request syntax or unsupported method */
|
|
6220
|
+
400: {
|
|
6221
|
+
headers: {
|
|
6222
|
+
[name: string]: unknown;
|
|
6223
|
+
};
|
|
6224
|
+
content: {
|
|
6225
|
+
"application/json": {
|
|
6226
|
+
detail: string;
|
|
6227
|
+
extra?:
|
|
6228
|
+
| null
|
|
6229
|
+
| {
|
|
6230
|
+
[key: string]: unknown;
|
|
6231
|
+
}
|
|
6232
|
+
| unknown[];
|
|
6233
|
+
status_code: number;
|
|
6234
|
+
};
|
|
6235
|
+
};
|
|
6236
|
+
};
|
|
6237
|
+
};
|
|
6238
|
+
};
|
|
6052
6239
|
"control.dcim.ports.list": {
|
|
6053
6240
|
parameters: {
|
|
6054
6241
|
query: {
|