@openshift-migration-advisor/planner-sdk 0.4.0-190ea33a47ea
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/.openapi-generator/FILES +105 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +173 -0
- package/dist/apis/AssessmentApi.d.ts +236 -0
- package/dist/apis/AssessmentApi.js +277 -0
- package/dist/apis/HealthApi.d.ts +54 -0
- package/dist/apis/HealthApi.js +66 -0
- package/dist/apis/ImageApi.d.ts +94 -0
- package/dist/apis/ImageApi.js +110 -0
- package/dist/apis/InfoApi.d.ts +55 -0
- package/dist/apis/InfoApi.js +68 -0
- package/dist/apis/JobApi.d.ts +131 -0
- package/dist/apis/JobApi.js +174 -0
- package/dist/apis/SourceApi.d.ts +260 -0
- package/dist/apis/SourceApi.js +309 -0
- package/dist/apis/index.d.ts +6 -0
- package/dist/apis/index.js +24 -0
- package/dist/esm/apis/AssessmentApi.d.ts +236 -0
- package/dist/esm/apis/AssessmentApi.js +273 -0
- package/dist/esm/apis/HealthApi.d.ts +54 -0
- package/dist/esm/apis/HealthApi.js +62 -0
- package/dist/esm/apis/ImageApi.d.ts +94 -0
- package/dist/esm/apis/ImageApi.js +106 -0
- package/dist/esm/apis/InfoApi.d.ts +55 -0
- package/dist/esm/apis/InfoApi.js +64 -0
- package/dist/esm/apis/JobApi.d.ts +131 -0
- package/dist/esm/apis/JobApi.js +170 -0
- package/dist/esm/apis/SourceApi.d.ts +260 -0
- package/dist/esm/apis/SourceApi.js +305 -0
- package/dist/esm/apis/index.d.ts +6 -0
- package/dist/esm/apis/index.js +8 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Agent.d.ts +80 -0
- package/dist/esm/models/Agent.js +78 -0
- package/dist/esm/models/AgentProxy.d.ts +44 -0
- package/dist/esm/models/AgentProxy.js +45 -0
- package/dist/esm/models/Assessment.d.ts +84 -0
- package/dist/esm/models/Assessment.js +74 -0
- package/dist/esm/models/AssessmentForm.d.ts +54 -0
- package/dist/esm/models/AssessmentForm.js +52 -0
- package/dist/esm/models/AssessmentUpdate.d.ts +32 -0
- package/dist/esm/models/AssessmentUpdate.js +41 -0
- package/dist/esm/models/ClusterRequirementsRequest.d.ts +87 -0
- package/dist/esm/models/ClusterRequirementsRequest.js +80 -0
- package/dist/esm/models/ClusterRequirementsResponse.d.ts +47 -0
- package/dist/esm/models/ClusterRequirementsResponse.js +54 -0
- package/dist/esm/models/ClusterSizing.d.ts +62 -0
- package/dist/esm/models/ClusterSizing.js +63 -0
- package/dist/esm/models/Datastore.d.ts +80 -0
- package/dist/esm/models/Datastore.js +73 -0
- package/dist/esm/models/DiskSizeTierSummary.d.ts +38 -0
- package/dist/esm/models/DiskSizeTierSummary.js +47 -0
- package/dist/esm/models/DiskTypeSummary.d.ts +38 -0
- package/dist/esm/models/DiskTypeSummary.js +47 -0
- package/dist/esm/models/Histogram.d.ts +44 -0
- package/dist/esm/models/Histogram.js +51 -0
- package/dist/esm/models/Host.d.ts +62 -0
- package/dist/esm/models/Host.js +55 -0
- package/dist/esm/models/Info.d.ts +38 -0
- package/dist/esm/models/Info.js +47 -0
- package/dist/esm/models/Infra.d.ts +106 -0
- package/dist/esm/models/Infra.js +74 -0
- package/dist/esm/models/Inventory.d.ts +47 -0
- package/dist/esm/models/Inventory.js +51 -0
- package/dist/esm/models/InventoryData.d.ts +47 -0
- package/dist/esm/models/InventoryData.js +52 -0
- package/dist/esm/models/InventoryTotals.d.ts +44 -0
- package/dist/esm/models/InventoryTotals.js +51 -0
- package/dist/esm/models/Ipv4Config.d.ts +50 -0
- package/dist/esm/models/Ipv4Config.js +55 -0
- package/dist/esm/models/Job.d.ts +51 -0
- package/dist/esm/models/Job.js +52 -0
- package/dist/esm/models/JobStatus.d.ts +36 -0
- package/dist/esm/models/JobStatus.js +54 -0
- package/dist/esm/models/Label.d.ts +38 -0
- package/dist/esm/models/Label.js +47 -0
- package/dist/esm/models/MigrationIssue.d.ts +50 -0
- package/dist/esm/models/MigrationIssue.js +53 -0
- package/dist/esm/models/ModelError.d.ts +38 -0
- package/dist/esm/models/ModelError.js +45 -0
- package/dist/esm/models/Network.d.ts +66 -0
- package/dist/esm/models/Network.js +62 -0
- package/dist/esm/models/OsInfo.d.ts +44 -0
- package/dist/esm/models/OsInfo.js +49 -0
- package/dist/esm/models/PresignedUrl.d.ts +38 -0
- package/dist/esm/models/PresignedUrl.js +45 -0
- package/dist/esm/models/SizingOverCommitRatio.d.ts +38 -0
- package/dist/esm/models/SizingOverCommitRatio.js +47 -0
- package/dist/esm/models/SizingResourceConsumption.d.ts +52 -0
- package/dist/esm/models/SizingResourceConsumption.js +53 -0
- package/dist/esm/models/SizingResourceLimits.d.ts +38 -0
- package/dist/esm/models/SizingResourceLimits.js +47 -0
- package/dist/esm/models/Snapshot.d.ts +39 -0
- package/dist/esm/models/Snapshot.js +48 -0
- package/dist/esm/models/Source.d.ts +84 -0
- package/dist/esm/models/Source.js +71 -0
- package/dist/esm/models/SourceCreate.d.ts +65 -0
- package/dist/esm/models/SourceCreate.js +56 -0
- package/dist/esm/models/SourceInfra.d.ts +46 -0
- package/dist/esm/models/SourceInfra.js +47 -0
- package/dist/esm/models/SourceUpdate.d.ts +65 -0
- package/dist/esm/models/SourceUpdate.js +54 -0
- package/dist/esm/models/Status.d.ts +44 -0
- package/dist/esm/models/Status.js +45 -0
- package/dist/esm/models/UpdateInventory.d.ts +39 -0
- package/dist/esm/models/UpdateInventory.js +48 -0
- package/dist/esm/models/VCenter.d.ts +32 -0
- package/dist/esm/models/VCenter.js +43 -0
- package/dist/esm/models/VMResourceBreakdown.d.ts +58 -0
- package/dist/esm/models/VMResourceBreakdown.js +58 -0
- package/dist/esm/models/VMs.d.ts +162 -0
- package/dist/esm/models/VMs.js +101 -0
- package/dist/esm/models/VmNetwork.d.ts +33 -0
- package/dist/esm/models/VmNetwork.js +42 -0
- package/dist/esm/models/index.d.ts +41 -0
- package/dist/esm/models/index.js +43 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Agent.d.ts +80 -0
- package/dist/models/Agent.js +86 -0
- package/dist/models/AgentProxy.d.ts +44 -0
- package/dist/models/AgentProxy.js +52 -0
- package/dist/models/Assessment.d.ts +84 -0
- package/dist/models/Assessment.js +82 -0
- package/dist/models/AssessmentForm.d.ts +54 -0
- package/dist/models/AssessmentForm.js +59 -0
- package/dist/models/AssessmentUpdate.d.ts +32 -0
- package/dist/models/AssessmentUpdate.js +48 -0
- package/dist/models/ClusterRequirementsRequest.d.ts +87 -0
- package/dist/models/ClusterRequirementsRequest.js +88 -0
- package/dist/models/ClusterRequirementsResponse.d.ts +47 -0
- package/dist/models/ClusterRequirementsResponse.js +61 -0
- package/dist/models/ClusterSizing.d.ts +62 -0
- package/dist/models/ClusterSizing.js +70 -0
- package/dist/models/Datastore.d.ts +80 -0
- package/dist/models/Datastore.js +80 -0
- package/dist/models/DiskSizeTierSummary.d.ts +38 -0
- package/dist/models/DiskSizeTierSummary.js +54 -0
- package/dist/models/DiskTypeSummary.d.ts +38 -0
- package/dist/models/DiskTypeSummary.js +54 -0
- package/dist/models/Histogram.d.ts +44 -0
- package/dist/models/Histogram.js +58 -0
- package/dist/models/Host.d.ts +62 -0
- package/dist/models/Host.js +62 -0
- package/dist/models/Info.d.ts +38 -0
- package/dist/models/Info.js +54 -0
- package/dist/models/Infra.d.ts +106 -0
- package/dist/models/Infra.js +81 -0
- package/dist/models/Inventory.d.ts +47 -0
- package/dist/models/Inventory.js +58 -0
- package/dist/models/InventoryData.d.ts +47 -0
- package/dist/models/InventoryData.js +59 -0
- package/dist/models/InventoryTotals.d.ts +44 -0
- package/dist/models/InventoryTotals.js +58 -0
- package/dist/models/Ipv4Config.d.ts +50 -0
- package/dist/models/Ipv4Config.js +62 -0
- package/dist/models/Job.d.ts +51 -0
- package/dist/models/Job.js +59 -0
- package/dist/models/JobStatus.d.ts +36 -0
- package/dist/models/JobStatus.js +62 -0
- package/dist/models/Label.d.ts +38 -0
- package/dist/models/Label.js +54 -0
- package/dist/models/MigrationIssue.d.ts +50 -0
- package/dist/models/MigrationIssue.js +60 -0
- package/dist/models/ModelError.d.ts +38 -0
- package/dist/models/ModelError.js +52 -0
- package/dist/models/Network.d.ts +66 -0
- package/dist/models/Network.js +70 -0
- package/dist/models/OsInfo.d.ts +44 -0
- package/dist/models/OsInfo.js +56 -0
- package/dist/models/PresignedUrl.d.ts +38 -0
- package/dist/models/PresignedUrl.js +52 -0
- package/dist/models/SizingOverCommitRatio.d.ts +38 -0
- package/dist/models/SizingOverCommitRatio.js +54 -0
- package/dist/models/SizingResourceConsumption.d.ts +52 -0
- package/dist/models/SizingResourceConsumption.js +60 -0
- package/dist/models/SizingResourceLimits.d.ts +38 -0
- package/dist/models/SizingResourceLimits.js +54 -0
- package/dist/models/Snapshot.d.ts +39 -0
- package/dist/models/Snapshot.js +55 -0
- package/dist/models/Source.d.ts +84 -0
- package/dist/models/Source.js +78 -0
- package/dist/models/SourceCreate.d.ts +65 -0
- package/dist/models/SourceCreate.js +63 -0
- package/dist/models/SourceInfra.d.ts +46 -0
- package/dist/models/SourceInfra.js +54 -0
- package/dist/models/SourceUpdate.d.ts +65 -0
- package/dist/models/SourceUpdate.js +61 -0
- package/dist/models/Status.d.ts +44 -0
- package/dist/models/Status.js +52 -0
- package/dist/models/UpdateInventory.d.ts +39 -0
- package/dist/models/UpdateInventory.js +55 -0
- package/dist/models/VCenter.d.ts +32 -0
- package/dist/models/VCenter.js +50 -0
- package/dist/models/VMResourceBreakdown.d.ts +58 -0
- package/dist/models/VMResourceBreakdown.js +65 -0
- package/dist/models/VMs.d.ts +162 -0
- package/dist/models/VMs.js +108 -0
- package/dist/models/VmNetwork.d.ts +33 -0
- package/dist/models/VmNetwork.js +49 -0
- package/dist/models/index.d.ts +41 -0
- package/dist/models/index.js +59 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/docs/Agent.md +46 -0
- package/docs/AgentProxy.md +38 -0
- package/docs/Assessment.md +48 -0
- package/docs/AssessmentApi.md +448 -0
- package/docs/AssessmentForm.md +40 -0
- package/docs/AssessmentUpdate.md +35 -0
- package/docs/ClusterRequirementsRequest.md +47 -0
- package/docs/ClusterRequirementsResponse.md +39 -0
- package/docs/ClusterSizing.md +45 -0
- package/docs/Datastore.md +50 -0
- package/docs/DiskSizeTierSummary.md +36 -0
- package/docs/DiskTypeSummary.md +36 -0
- package/docs/HealthApi.md +68 -0
- package/docs/Histogram.md +38 -0
- package/docs/Host.md +44 -0
- package/docs/ImageApi.md +152 -0
- package/docs/Info.md +37 -0
- package/docs/InfoApi.md +69 -0
- package/docs/Infra.md +56 -0
- package/docs/Inventory.md +38 -0
- package/docs/InventoryData.md +38 -0
- package/docs/InventoryTotals.md +39 -0
- package/docs/Ipv4Config.md +40 -0
- package/docs/Job.md +41 -0
- package/docs/JobApi.md +229 -0
- package/docs/JobStatus.md +33 -0
- package/docs/Label.md +36 -0
- package/docs/MigrationIssue.md +40 -0
- package/docs/ModelError.md +36 -0
- package/docs/Network.md +42 -0
- package/docs/OsInfo.md +38 -0
- package/docs/PresignedUrl.md +36 -0
- package/docs/SizingOverCommitRatio.md +37 -0
- package/docs/SizingResourceConsumption.md +41 -0
- package/docs/SizingResourceLimits.md +37 -0
- package/docs/Snapshot.md +36 -0
- package/docs/Source.md +50 -0
- package/docs/SourceApi.md +501 -0
- package/docs/SourceCreate.md +44 -0
- package/docs/SourceInfra.md +38 -0
- package/docs/SourceUpdate.md +44 -0
- package/docs/Status.md +39 -0
- package/docs/UpdateInventory.md +36 -0
- package/docs/VCenter.md +34 -0
- package/docs/VMResourceBreakdown.md +42 -0
- package/docs/VMs.md +70 -0
- package/docs/VmNetwork.md +34 -0
- package/package.json +22 -0
- package/src/apis/AssessmentApi.ts +501 -0
- package/src/apis/HealthApi.ts +88 -0
- package/src/apis/ImageApi.ts +180 -0
- package/src/apis/InfoApi.ts +96 -0
- package/src/apis/JobApi.ts +286 -0
- package/src/apis/SourceApi.ts +548 -0
- package/src/apis/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/models/Agent.ts +135 -0
- package/src/models/AgentProxy.ts +81 -0
- package/src/models/Assessment.ts +146 -0
- package/src/models/AssessmentForm.ts +102 -0
- package/src/models/AssessmentUpdate.ts +65 -0
- package/src/models/ClusterRequirementsRequest.ts +141 -0
- package/src/models/ClusterRequirementsResponse.ts +106 -0
- package/src/models/ClusterSizing.ts +111 -0
- package/src/models/Datastore.ts +137 -0
- package/src/models/DiskSizeTierSummary.ts +75 -0
- package/src/models/DiskTypeSummary.ts +75 -0
- package/src/models/Histogram.ts +84 -0
- package/src/models/Host.ts +107 -0
- package/src/models/Info.ts +75 -0
- package/src/models/Infra.ts +182 -0
- package/src/models/Inventory.ts +91 -0
- package/src/models/InventoryData.ts +105 -0
- package/src/models/InventoryTotals.ts +84 -0
- package/src/models/Ipv4Config.ts +93 -0
- package/src/models/Job.ts +101 -0
- package/src/models/JobStatus.ts +64 -0
- package/src/models/Label.ts +75 -0
- package/src/models/MigrationIssue.ts +92 -0
- package/src/models/ModelError.ts +74 -0
- package/src/models/Network.ts +112 -0
- package/src/models/OsInfo.ts +83 -0
- package/src/models/PresignedUrl.ts +74 -0
- package/src/models/SizingOverCommitRatio.ts +75 -0
- package/src/models/SizingResourceConsumption.ts +106 -0
- package/src/models/SizingResourceLimits.ts +75 -0
- package/src/models/Snapshot.ts +83 -0
- package/src/models/Source.ts +163 -0
- package/src/models/SourceCreate.ts +128 -0
- package/src/models/SourceInfra.ts +96 -0
- package/src/models/SourceUpdate.ts +127 -0
- package/src/models/Status.ts +81 -0
- package/src/models/UpdateInventory.ts +83 -0
- package/src/models/VCenter.ts +66 -0
- package/src/models/VMResourceBreakdown.ts +110 -0
- package/src/models/VMs.ts +255 -0
- package/src/models/VmNetwork.ts +73 -0
- package/src/models/index.ts +43 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration Planner API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { MigrationIssue } from './MigrationIssue.js';
|
|
13
|
+
import type { OsInfo } from './OsInfo.js';
|
|
14
|
+
import type { DiskSizeTierSummary } from './DiskSizeTierSummary.js';
|
|
15
|
+
import type { DiskTypeSummary } from './DiskTypeSummary.js';
|
|
16
|
+
import type { VMResourceBreakdown } from './VMResourceBreakdown.js';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface VMs
|
|
21
|
+
*/
|
|
22
|
+
export interface VMs {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @memberof VMs
|
|
27
|
+
*/
|
|
28
|
+
total: number;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof VMs
|
|
33
|
+
*/
|
|
34
|
+
totalMigratable: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof VMs
|
|
39
|
+
*/
|
|
40
|
+
totalMigratableWithWarnings?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Number of VMs that have at least one shared disk
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof VMs
|
|
45
|
+
*/
|
|
46
|
+
totalWithSharedDisks?: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {VMResourceBreakdown}
|
|
50
|
+
* @memberof VMs
|
|
51
|
+
*/
|
|
52
|
+
cpuCores: VMResourceBreakdown;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {{ [key: string]: DiskSizeTierSummary; }}
|
|
56
|
+
* @memberof VMs
|
|
57
|
+
*/
|
|
58
|
+
diskSizeTier?: {
|
|
59
|
+
[key: string]: DiskSizeTierSummary;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {{ [key: string]: DiskTypeSummary; }}
|
|
64
|
+
* @memberof VMs
|
|
65
|
+
*/
|
|
66
|
+
diskTypes?: {
|
|
67
|
+
[key: string]: DiskTypeSummary;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Distribution of VMs across CPU tier buckets (e.g., "0-4", "5-8", "9-16", "17-32", "32+")
|
|
71
|
+
* @type {{ [key: string]: number; }}
|
|
72
|
+
* @memberof VMs
|
|
73
|
+
*/
|
|
74
|
+
distributionByCpuTier?: {
|
|
75
|
+
[key: string]: number;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Distribution of VMs across Memory tier buckets (e.g., "0-4", "5-16", "17-32", "33-64", "65-128", "129-256", "256+")
|
|
79
|
+
* @type {{ [key: string]: number; }}
|
|
80
|
+
* @memberof VMs
|
|
81
|
+
*/
|
|
82
|
+
distributionByMemoryTier?: {
|
|
83
|
+
[key: string]: number;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Distribution of VMs by NIC count (e.g., "0", "1", "2", "3", "4+")
|
|
87
|
+
* @type {{ [key: string]: number; }}
|
|
88
|
+
* @memberof VMs
|
|
89
|
+
*/
|
|
90
|
+
distributionByNicCount?: {
|
|
91
|
+
[key: string]: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {VMResourceBreakdown}
|
|
96
|
+
* @memberof VMs
|
|
97
|
+
*/
|
|
98
|
+
ramGB: VMResourceBreakdown;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {VMResourceBreakdown}
|
|
102
|
+
* @memberof VMs
|
|
103
|
+
*/
|
|
104
|
+
diskGB: VMResourceBreakdown;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {VMResourceBreakdown}
|
|
108
|
+
* @memberof VMs
|
|
109
|
+
*/
|
|
110
|
+
diskCount: VMResourceBreakdown;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {VMResourceBreakdown}
|
|
114
|
+
* @memberof VMs
|
|
115
|
+
*/
|
|
116
|
+
nicCount?: VMResourceBreakdown;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {{ [key: string]: number; }}
|
|
120
|
+
* @memberof VMs
|
|
121
|
+
*/
|
|
122
|
+
powerStates: {
|
|
123
|
+
[key: string]: number;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @type {{ [key: string]: number; }}
|
|
128
|
+
* @memberof VMs
|
|
129
|
+
* @deprecated
|
|
130
|
+
*/
|
|
131
|
+
os?: {
|
|
132
|
+
[key: string]: number;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @type {{ [key: string]: OsInfo; }}
|
|
137
|
+
* @memberof VMs
|
|
138
|
+
*/
|
|
139
|
+
osInfo?: {
|
|
140
|
+
[key: string]: OsInfo;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {Array<MigrationIssue>}
|
|
145
|
+
* @memberof VMs
|
|
146
|
+
*/
|
|
147
|
+
notMigratableReasons: Array<MigrationIssue>;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @type {Array<MigrationIssue>}
|
|
151
|
+
* @memberof VMs
|
|
152
|
+
*/
|
|
153
|
+
migrationWarnings: Array<MigrationIssue>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Check if a given object implements the VMs interface.
|
|
157
|
+
*/
|
|
158
|
+
export declare function instanceOfVMs(value: object): value is VMs;
|
|
159
|
+
export declare function VMsFromJSON(json: any): VMs;
|
|
160
|
+
export declare function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs;
|
|
161
|
+
export declare function VMsToJSON(json: any): VMs;
|
|
162
|
+
export declare function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Migration Planner API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: undefined
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { mapValues } from '../runtime.js';
|
|
15
|
+
import { MigrationIssueFromJSON, MigrationIssueToJSON, } from './MigrationIssue.js';
|
|
16
|
+
import { OsInfoFromJSON, OsInfoToJSON, } from './OsInfo.js';
|
|
17
|
+
import { DiskSizeTierSummaryFromJSON, DiskSizeTierSummaryToJSON, } from './DiskSizeTierSummary.js';
|
|
18
|
+
import { DiskTypeSummaryFromJSON, DiskTypeSummaryToJSON, } from './DiskTypeSummary.js';
|
|
19
|
+
import { VMResourceBreakdownFromJSON, VMResourceBreakdownToJSON, } from './VMResourceBreakdown.js';
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the VMs interface.
|
|
22
|
+
*/
|
|
23
|
+
export function instanceOfVMs(value) {
|
|
24
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('totalMigratable' in value) || value['totalMigratable'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('cpuCores' in value) || value['cpuCores'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('ramGB' in value) || value['ramGB'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('diskGB' in value) || value['diskGB'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('diskCount' in value) || value['diskCount'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('powerStates' in value) || value['powerStates'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('notMigratableReasons' in value) || value['notMigratableReasons'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('migrationWarnings' in value) || value['migrationWarnings'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
export function VMsFromJSON(json) {
|
|
45
|
+
return VMsFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'total': json['total'],
|
|
53
|
+
'totalMigratable': json['totalMigratable'],
|
|
54
|
+
'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
|
|
55
|
+
'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'],
|
|
56
|
+
'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']),
|
|
57
|
+
'diskSizeTier': json['diskSizeTier'] == null ? undefined : (mapValues(json['diskSizeTier'], DiskSizeTierSummaryFromJSON)),
|
|
58
|
+
'diskTypes': json['diskTypes'] == null ? undefined : (mapValues(json['diskTypes'], DiskTypeSummaryFromJSON)),
|
|
59
|
+
'distributionByCpuTier': json['distributionByCpuTier'] == null ? undefined : json['distributionByCpuTier'],
|
|
60
|
+
'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
|
|
61
|
+
'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
|
|
62
|
+
'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
|
|
63
|
+
'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
|
|
64
|
+
'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
|
|
65
|
+
'nicCount': json['nicCount'] == null ? undefined : VMResourceBreakdownFromJSON(json['nicCount']),
|
|
66
|
+
'powerStates': json['powerStates'],
|
|
67
|
+
'os': json['os'] == null ? undefined : json['os'],
|
|
68
|
+
'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
|
|
69
|
+
'notMigratableReasons': (json['notMigratableReasons'].map(MigrationIssueFromJSON)),
|
|
70
|
+
'migrationWarnings': (json['migrationWarnings'].map(MigrationIssueFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function VMsToJSON(json) {
|
|
74
|
+
return VMsToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
export function VMsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
'total': value['total'],
|
|
82
|
+
'totalMigratable': value['totalMigratable'],
|
|
83
|
+
'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
|
|
84
|
+
'totalWithSharedDisks': value['totalWithSharedDisks'],
|
|
85
|
+
'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']),
|
|
86
|
+
'diskSizeTier': value['diskSizeTier'] == null ? undefined : (mapValues(value['diskSizeTier'], DiskSizeTierSummaryToJSON)),
|
|
87
|
+
'diskTypes': value['diskTypes'] == null ? undefined : (mapValues(value['diskTypes'], DiskTypeSummaryToJSON)),
|
|
88
|
+
'distributionByCpuTier': value['distributionByCpuTier'],
|
|
89
|
+
'distributionByMemoryTier': value['distributionByMemoryTier'],
|
|
90
|
+
'distributionByNicCount': value['distributionByNicCount'],
|
|
91
|
+
'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
|
|
92
|
+
'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
|
|
93
|
+
'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
|
|
94
|
+
'nicCount': VMResourceBreakdownToJSON(value['nicCount']),
|
|
95
|
+
'powerStates': value['powerStates'],
|
|
96
|
+
'os': value['os'],
|
|
97
|
+
'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)),
|
|
98
|
+
'notMigratableReasons': (value['notMigratableReasons'].map(MigrationIssueToJSON)),
|
|
99
|
+
'migrationWarnings': (value['migrationWarnings'].map(MigrationIssueToJSON)),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration Planner API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Ipv4Config } from './Ipv4Config.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface VmNetwork
|
|
17
|
+
*/
|
|
18
|
+
export interface VmNetwork {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Ipv4Config}
|
|
22
|
+
* @memberof VmNetwork
|
|
23
|
+
*/
|
|
24
|
+
ipv4?: Ipv4Config;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the VmNetwork interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfVmNetwork(value: object): value is VmNetwork;
|
|
30
|
+
export declare function VmNetworkFromJSON(json: any): VmNetwork;
|
|
31
|
+
export declare function VmNetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): VmNetwork;
|
|
32
|
+
export declare function VmNetworkToJSON(json: any): VmNetwork;
|
|
33
|
+
export declare function VmNetworkToJSONTyped(value?: VmNetwork | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Migration Planner API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: undefined
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { Ipv4ConfigFromJSON, Ipv4ConfigToJSON, } from './Ipv4Config.js';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the VmNetwork interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfVmNetwork(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function VmNetworkFromJSON(json) {
|
|
22
|
+
return VmNetworkFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function VmNetworkFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'ipv4': json['ipv4'] == null ? undefined : Ipv4ConfigFromJSON(json['ipv4']),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function VmNetworkToJSON(json) {
|
|
33
|
+
return VmNetworkToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function VmNetworkToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'ipv4': Ipv4ConfigToJSON(value['ipv4']),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export * from './Agent.js';
|
|
2
|
+
export * from './AgentProxy.js';
|
|
3
|
+
export * from './Assessment.js';
|
|
4
|
+
export * from './AssessmentForm.js';
|
|
5
|
+
export * from './AssessmentUpdate.js';
|
|
6
|
+
export * from './ClusterRequirementsRequest.js';
|
|
7
|
+
export * from './ClusterRequirementsResponse.js';
|
|
8
|
+
export * from './ClusterSizing.js';
|
|
9
|
+
export * from './Datastore.js';
|
|
10
|
+
export * from './DiskSizeTierSummary.js';
|
|
11
|
+
export * from './DiskTypeSummary.js';
|
|
12
|
+
export * from './Histogram.js';
|
|
13
|
+
export * from './Host.js';
|
|
14
|
+
export * from './Info.js';
|
|
15
|
+
export * from './Infra.js';
|
|
16
|
+
export * from './Inventory.js';
|
|
17
|
+
export * from './InventoryData.js';
|
|
18
|
+
export * from './InventoryTotals.js';
|
|
19
|
+
export * from './Ipv4Config.js';
|
|
20
|
+
export * from './Job.js';
|
|
21
|
+
export * from './JobStatus.js';
|
|
22
|
+
export * from './Label.js';
|
|
23
|
+
export * from './MigrationIssue.js';
|
|
24
|
+
export * from './ModelError.js';
|
|
25
|
+
export * from './Network.js';
|
|
26
|
+
export * from './OsInfo.js';
|
|
27
|
+
export * from './PresignedUrl.js';
|
|
28
|
+
export * from './SizingOverCommitRatio.js';
|
|
29
|
+
export * from './SizingResourceConsumption.js';
|
|
30
|
+
export * from './SizingResourceLimits.js';
|
|
31
|
+
export * from './Snapshot.js';
|
|
32
|
+
export * from './Source.js';
|
|
33
|
+
export * from './SourceCreate.js';
|
|
34
|
+
export * from './SourceInfra.js';
|
|
35
|
+
export * from './SourceUpdate.js';
|
|
36
|
+
export * from './Status.js';
|
|
37
|
+
export * from './UpdateInventory.js';
|
|
38
|
+
export * from './VCenter.js';
|
|
39
|
+
export * from './VMResourceBreakdown.js';
|
|
40
|
+
export * from './VMs.js';
|
|
41
|
+
export * from './VmNetwork.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './Agent.js';
|
|
4
|
+
export * from './AgentProxy.js';
|
|
5
|
+
export * from './Assessment.js';
|
|
6
|
+
export * from './AssessmentForm.js';
|
|
7
|
+
export * from './AssessmentUpdate.js';
|
|
8
|
+
export * from './ClusterRequirementsRequest.js';
|
|
9
|
+
export * from './ClusterRequirementsResponse.js';
|
|
10
|
+
export * from './ClusterSizing.js';
|
|
11
|
+
export * from './Datastore.js';
|
|
12
|
+
export * from './DiskSizeTierSummary.js';
|
|
13
|
+
export * from './DiskTypeSummary.js';
|
|
14
|
+
export * from './Histogram.js';
|
|
15
|
+
export * from './Host.js';
|
|
16
|
+
export * from './Info.js';
|
|
17
|
+
export * from './Infra.js';
|
|
18
|
+
export * from './Inventory.js';
|
|
19
|
+
export * from './InventoryData.js';
|
|
20
|
+
export * from './InventoryTotals.js';
|
|
21
|
+
export * from './Ipv4Config.js';
|
|
22
|
+
export * from './Job.js';
|
|
23
|
+
export * from './JobStatus.js';
|
|
24
|
+
export * from './Label.js';
|
|
25
|
+
export * from './MigrationIssue.js';
|
|
26
|
+
export * from './ModelError.js';
|
|
27
|
+
export * from './Network.js';
|
|
28
|
+
export * from './OsInfo.js';
|
|
29
|
+
export * from './PresignedUrl.js';
|
|
30
|
+
export * from './SizingOverCommitRatio.js';
|
|
31
|
+
export * from './SizingResourceConsumption.js';
|
|
32
|
+
export * from './SizingResourceLimits.js';
|
|
33
|
+
export * from './Snapshot.js';
|
|
34
|
+
export * from './Source.js';
|
|
35
|
+
export * from './SourceCreate.js';
|
|
36
|
+
export * from './SourceInfra.js';
|
|
37
|
+
export * from './SourceUpdate.js';
|
|
38
|
+
export * from './Status.js';
|
|
39
|
+
export * from './UpdateInventory.js';
|
|
40
|
+
export * from './VCenter.js';
|
|
41
|
+
export * from './VMResourceBreakdown.js';
|
|
42
|
+
export * from './VMs.js';
|
|
43
|
+
export * from './VmNetwork.js';
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration Planner API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export declare const BASE_PATH: string;
|
|
13
|
+
export interface ConfigurationParameters {
|
|
14
|
+
basePath?: string;
|
|
15
|
+
fetchApi?: FetchAPI;
|
|
16
|
+
middleware?: Middleware[];
|
|
17
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
|
|
21
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
22
|
+
headers?: HTTPHeaders;
|
|
23
|
+
credentials?: RequestCredentials;
|
|
24
|
+
}
|
|
25
|
+
export declare class Configuration {
|
|
26
|
+
private configuration;
|
|
27
|
+
constructor(configuration?: ConfigurationParameters);
|
|
28
|
+
set config(configuration: Configuration);
|
|
29
|
+
get basePath(): string;
|
|
30
|
+
get fetchApi(): FetchAPI | undefined;
|
|
31
|
+
get middleware(): Middleware[];
|
|
32
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
33
|
+
get username(): string | undefined;
|
|
34
|
+
get password(): string | undefined;
|
|
35
|
+
get apiKey(): ((name: string) => string | Promise<string>) | undefined;
|
|
36
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
37
|
+
get headers(): HTTPHeaders | undefined;
|
|
38
|
+
get credentials(): RequestCredentials | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare const DefaultConfig: Configuration;
|
|
41
|
+
/**
|
|
42
|
+
* This is the base class for all generated API classes.
|
|
43
|
+
*/
|
|
44
|
+
export declare class BaseAPI {
|
|
45
|
+
protected configuration: Configuration;
|
|
46
|
+
private static readonly jsonRegex;
|
|
47
|
+
private middleware;
|
|
48
|
+
constructor(configuration?: Configuration);
|
|
49
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
50
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
51
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
52
|
+
/**
|
|
53
|
+
* Check if the given MIME is a JSON MIME.
|
|
54
|
+
* JSON MIME examples:
|
|
55
|
+
* application/json
|
|
56
|
+
* application/json; charset=UTF8
|
|
57
|
+
* APPLICATION/JSON
|
|
58
|
+
* application/vnd.company+json
|
|
59
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
60
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
63
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
64
|
+
private createFetchParams;
|
|
65
|
+
private fetchApi;
|
|
66
|
+
/**
|
|
67
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
68
|
+
* and then shallow cloning data members.
|
|
69
|
+
*/
|
|
70
|
+
private clone;
|
|
71
|
+
}
|
|
72
|
+
export declare class ResponseError extends Error {
|
|
73
|
+
response: Response;
|
|
74
|
+
name: "ResponseError";
|
|
75
|
+
constructor(response: Response, msg?: string);
|
|
76
|
+
}
|
|
77
|
+
export declare class FetchError extends Error {
|
|
78
|
+
cause: Error;
|
|
79
|
+
name: "FetchError";
|
|
80
|
+
constructor(cause: Error, msg?: string);
|
|
81
|
+
}
|
|
82
|
+
export declare class RequiredError extends Error {
|
|
83
|
+
field: string;
|
|
84
|
+
name: "RequiredError";
|
|
85
|
+
constructor(field: string, msg?: string);
|
|
86
|
+
}
|
|
87
|
+
export declare const COLLECTION_FORMATS: {
|
|
88
|
+
csv: string;
|
|
89
|
+
ssv: string;
|
|
90
|
+
tsv: string;
|
|
91
|
+
pipes: string;
|
|
92
|
+
};
|
|
93
|
+
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
94
|
+
export type Json = any;
|
|
95
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
96
|
+
export type HTTPHeaders = {
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
};
|
|
99
|
+
export type HTTPQuery = {
|
|
100
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
101
|
+
};
|
|
102
|
+
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
103
|
+
export type HTTPRequestInit = {
|
|
104
|
+
headers?: HTTPHeaders;
|
|
105
|
+
method: HTTPMethod;
|
|
106
|
+
credentials?: RequestCredentials;
|
|
107
|
+
body?: HTTPBody;
|
|
108
|
+
};
|
|
109
|
+
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
110
|
+
export type InitOverrideFunction = (requestContext: {
|
|
111
|
+
init: HTTPRequestInit;
|
|
112
|
+
context: RequestOpts;
|
|
113
|
+
}) => Promise<RequestInit>;
|
|
114
|
+
export interface FetchParams {
|
|
115
|
+
url: string;
|
|
116
|
+
init: RequestInit;
|
|
117
|
+
}
|
|
118
|
+
export interface RequestOpts {
|
|
119
|
+
path: string;
|
|
120
|
+
method: HTTPMethod;
|
|
121
|
+
headers: HTTPHeaders;
|
|
122
|
+
query?: HTTPQuery;
|
|
123
|
+
body?: HTTPBody;
|
|
124
|
+
}
|
|
125
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
126
|
+
export declare function exists(json: any, key: string): boolean;
|
|
127
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {
|
|
128
|
+
[key: string]: any;
|
|
129
|
+
};
|
|
130
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
131
|
+
export interface Consume {
|
|
132
|
+
contentType: string;
|
|
133
|
+
}
|
|
134
|
+
export interface RequestContext {
|
|
135
|
+
fetch: FetchAPI;
|
|
136
|
+
url: string;
|
|
137
|
+
init: RequestInit;
|
|
138
|
+
}
|
|
139
|
+
export interface ResponseContext {
|
|
140
|
+
fetch: FetchAPI;
|
|
141
|
+
url: string;
|
|
142
|
+
init: RequestInit;
|
|
143
|
+
response: Response;
|
|
144
|
+
}
|
|
145
|
+
export interface ErrorContext {
|
|
146
|
+
fetch: FetchAPI;
|
|
147
|
+
url: string;
|
|
148
|
+
init: RequestInit;
|
|
149
|
+
error: unknown;
|
|
150
|
+
response?: Response;
|
|
151
|
+
}
|
|
152
|
+
export interface Middleware {
|
|
153
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
154
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
155
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
156
|
+
}
|
|
157
|
+
export interface ApiResponse<T> {
|
|
158
|
+
raw: Response;
|
|
159
|
+
value(): Promise<T>;
|
|
160
|
+
}
|
|
161
|
+
export interface ResponseTransformer<T> {
|
|
162
|
+
(json: any): T;
|
|
163
|
+
}
|
|
164
|
+
export declare class JSONApiResponse<T> {
|
|
165
|
+
raw: Response;
|
|
166
|
+
private transformer;
|
|
167
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
168
|
+
value(): Promise<T>;
|
|
169
|
+
}
|
|
170
|
+
export declare class VoidApiResponse {
|
|
171
|
+
raw: Response;
|
|
172
|
+
constructor(raw: Response);
|
|
173
|
+
value(): Promise<void>;
|
|
174
|
+
}
|
|
175
|
+
export declare class BlobApiResponse {
|
|
176
|
+
raw: Response;
|
|
177
|
+
constructor(raw: Response);
|
|
178
|
+
value(): Promise<Blob>;
|
|
179
|
+
}
|
|
180
|
+
export declare class TextApiResponse {
|
|
181
|
+
raw: Response;
|
|
182
|
+
constructor(raw: Response);
|
|
183
|
+
value(): Promise<string>;
|
|
184
|
+
}
|