@nutanix-scratch/multidomain-js-client 4.2.1

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 (137) hide show
  1. package/LICENSE.txt +202 -0
  2. package/README.md +224 -0
  3. package/dist/Ntnx-Multidomain-js-client-prod.js +1 -0
  4. package/dist/Ntnx-Multidomain-js-client.js +713 -0
  5. package/dist/es/ApiClient.d.ts +194 -0
  6. package/dist/es/ApiClient.js +1449 -0
  7. package/dist/es/Paginable.d.ts +95 -0
  8. package/dist/es/Paginable.js +248 -0
  9. package/dist/es/apis/externalrepositories-endpoints.d.ts +84 -0
  10. package/dist/es/apis/externalrepositories-endpoints.js +267 -0
  11. package/dist/es/index.d.ts +60 -0
  12. package/dist/es/index.js +236 -0
  13. package/dist/es/models/common/v1/config/FQDN.d.ts +47 -0
  14. package/dist/es/models/common/v1/config/FQDN.js +238 -0
  15. package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
  16. package/dist/es/models/common/v1/config/Flag.js +278 -0
  17. package/dist/es/models/common/v1/config/IPAddressOrFQDN.d.ts +70 -0
  18. package/dist/es/models/common/v1/config/IPAddressOrFQDN.js +313 -0
  19. package/dist/es/models/common/v1/config/IPv4Address.d.ts +70 -0
  20. package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
  21. package/dist/es/models/common/v1/config/IPv6Address.d.ts +70 -0
  22. package/dist/es/models/common/v1/config/IPv6Address.js +288 -0
  23. package/dist/es/models/common/v1/config/KVPair.d.ts +65 -0
  24. package/dist/es/models/common/v1/config/KVPair.js +333 -0
  25. package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +53 -0
  26. package/dist/es/models/common/v1/config/MapOfStringWrapper.js +236 -0
  27. package/dist/es/models/common/v1/config/Message.d.ts +79 -0
  28. package/dist/es/models/common/v1/config/Message.js +341 -0
  29. package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
  30. package/dist/es/models/common/v1/config/MessageSeverity.js +89 -0
  31. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +47 -0
  32. package/dist/es/models/common/v1/config/TenantAwareModel.js +235 -0
  33. package/dist/es/models/common/v1/response/ApiLink.d.ts +58 -0
  34. package/dist/es/models/common/v1/response/ApiLink.js +271 -0
  35. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +95 -0
  36. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +419 -0
  37. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +34 -0
  38. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +262 -0
  39. package/dist/es/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.d.ts +58 -0
  40. package/dist/es/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.js +288 -0
  41. package/dist/es/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.d.ts +58 -0
  42. package/dist/es/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.js +288 -0
  43. package/dist/es/models/multidomain/v4/config/ExternalRepository.d.ts +59 -0
  44. package/dist/es/models/multidomain/v4/config/ExternalRepository.js +328 -0
  45. package/dist/es/models/multidomain/v4/config/GetExternalRepositoryApiResponse.d.ts +58 -0
  46. package/dist/es/models/multidomain/v4/config/GetExternalRepositoryApiResponse.js +288 -0
  47. package/dist/es/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.d.ts +58 -0
  48. package/dist/es/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.js +310 -0
  49. package/dist/es/models/multidomain/v4/config/NFSServerAddress.d.ts +71 -0
  50. package/dist/es/models/multidomain/v4/config/NFSServerAddress.js +279 -0
  51. package/dist/es/models/multidomain/v4/config/NfsRepository.d.ts +73 -0
  52. package/dist/es/models/multidomain/v4/config/NfsRepository.js +299 -0
  53. package/dist/es/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.d.ts +58 -0
  54. package/dist/es/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.js +288 -0
  55. package/dist/es/models/multidomain/v4/error/AppMessage.d.ts +107 -0
  56. package/dist/es/models/multidomain/v4/error/AppMessage.js +415 -0
  57. package/dist/es/models/multidomain/v4/error/ErrorResponse.d.ts +47 -0
  58. package/dist/es/models/multidomain/v4/error/ErrorResponse.js +277 -0
  59. package/dist/es/models/multidomain/v4/error/SchemaValidationError.d.ts +92 -0
  60. package/dist/es/models/multidomain/v4/error/SchemaValidationError.js +389 -0
  61. package/dist/es/models/multidomain/v4/error/SchemaValidationErrorMessage.d.ts +69 -0
  62. package/dist/es/models/multidomain/v4/error/SchemaValidationErrorMessage.js +307 -0
  63. package/dist/es/models/prism/v4/config/TaskReference.d.ts +47 -0
  64. package/dist/es/models/prism/v4/config/TaskReference.js +242 -0
  65. package/dist/es/models/validation/ValidationError.d.ts +13 -0
  66. package/dist/es/models/validation/ValidationError.js +44 -0
  67. package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
  68. package/dist/es/models/validation/ValidationScopes.js +38 -0
  69. package/dist/es/utils/ValidationUtils.d.ts +13 -0
  70. package/dist/es/utils/ValidationUtils.js +55 -0
  71. package/dist/lib/ApiClient.d.ts +194 -0
  72. package/dist/lib/ApiClient.js +1449 -0
  73. package/dist/lib/Paginable.d.ts +95 -0
  74. package/dist/lib/Paginable.js +248 -0
  75. package/dist/lib/apis/externalrepositories-endpoints.d.ts +84 -0
  76. package/dist/lib/apis/externalrepositories-endpoints.js +267 -0
  77. package/dist/lib/index.d.ts +60 -0
  78. package/dist/lib/index.js +236 -0
  79. package/dist/lib/models/common/v1/config/FQDN.d.ts +47 -0
  80. package/dist/lib/models/common/v1/config/FQDN.js +238 -0
  81. package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
  82. package/dist/lib/models/common/v1/config/Flag.js +278 -0
  83. package/dist/lib/models/common/v1/config/IPAddressOrFQDN.d.ts +70 -0
  84. package/dist/lib/models/common/v1/config/IPAddressOrFQDN.js +313 -0
  85. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +70 -0
  86. package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
  87. package/dist/lib/models/common/v1/config/IPv6Address.d.ts +70 -0
  88. package/dist/lib/models/common/v1/config/IPv6Address.js +288 -0
  89. package/dist/lib/models/common/v1/config/KVPair.d.ts +65 -0
  90. package/dist/lib/models/common/v1/config/KVPair.js +333 -0
  91. package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +53 -0
  92. package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +236 -0
  93. package/dist/lib/models/common/v1/config/Message.d.ts +79 -0
  94. package/dist/lib/models/common/v1/config/Message.js +341 -0
  95. package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
  96. package/dist/lib/models/common/v1/config/MessageSeverity.js +89 -0
  97. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +47 -0
  98. package/dist/lib/models/common/v1/config/TenantAwareModel.js +235 -0
  99. package/dist/lib/models/common/v1/response/ApiLink.d.ts +58 -0
  100. package/dist/lib/models/common/v1/response/ApiLink.js +271 -0
  101. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +95 -0
  102. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +419 -0
  103. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +34 -0
  104. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +262 -0
  105. package/dist/lib/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.d.ts +58 -0
  106. package/dist/lib/models/multidomain/v4/config/CreateExternalRepositoryApiResponse.js +288 -0
  107. package/dist/lib/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.d.ts +58 -0
  108. package/dist/lib/models/multidomain/v4/config/DeleteExternalRepositoryApiResponse.js +288 -0
  109. package/dist/lib/models/multidomain/v4/config/ExternalRepository.d.ts +59 -0
  110. package/dist/lib/models/multidomain/v4/config/ExternalRepository.js +328 -0
  111. package/dist/lib/models/multidomain/v4/config/GetExternalRepositoryApiResponse.d.ts +58 -0
  112. package/dist/lib/models/multidomain/v4/config/GetExternalRepositoryApiResponse.js +288 -0
  113. package/dist/lib/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.d.ts +58 -0
  114. package/dist/lib/models/multidomain/v4/config/ListExternalRepositoriesApiResponse.js +310 -0
  115. package/dist/lib/models/multidomain/v4/config/NFSServerAddress.d.ts +71 -0
  116. package/dist/lib/models/multidomain/v4/config/NFSServerAddress.js +279 -0
  117. package/dist/lib/models/multidomain/v4/config/NfsRepository.d.ts +73 -0
  118. package/dist/lib/models/multidomain/v4/config/NfsRepository.js +299 -0
  119. package/dist/lib/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.d.ts +58 -0
  120. package/dist/lib/models/multidomain/v4/config/UpdateExternalRepositoryApiResponse.js +288 -0
  121. package/dist/lib/models/multidomain/v4/error/AppMessage.d.ts +107 -0
  122. package/dist/lib/models/multidomain/v4/error/AppMessage.js +415 -0
  123. package/dist/lib/models/multidomain/v4/error/ErrorResponse.d.ts +47 -0
  124. package/dist/lib/models/multidomain/v4/error/ErrorResponse.js +277 -0
  125. package/dist/lib/models/multidomain/v4/error/SchemaValidationError.d.ts +92 -0
  126. package/dist/lib/models/multidomain/v4/error/SchemaValidationError.js +389 -0
  127. package/dist/lib/models/multidomain/v4/error/SchemaValidationErrorMessage.d.ts +69 -0
  128. package/dist/lib/models/multidomain/v4/error/SchemaValidationErrorMessage.js +307 -0
  129. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +47 -0
  130. package/dist/lib/models/prism/v4/config/TaskReference.js +242 -0
  131. package/dist/lib/models/validation/ValidationError.d.ts +13 -0
  132. package/dist/lib/models/validation/ValidationError.js +44 -0
  133. package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
  134. package/dist/lib/models/validation/ValidationScopes.js +38 -0
  135. package/dist/lib/utils/ValidationUtils.d.ts +13 -0
  136. package/dist/lib/utils/ValidationUtils.js +55 -0
  137. package/package.json +53 -0
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /**
8
+ * Enum class ValidationScopes.
9
+ * @enum {}
10
+ * @readonly
11
+ */
12
+
13
+ const ValidationScopes = {
14
+ /**
15
+ * value: {DEFAULT}
16
+ * @const
17
+ */
18
+ DEFAULT: "DEFAULT"
19
+ };
20
+ ValidationScopes.constructFromObject = function (obj) {
21
+ if (typeof obj === 'string' || obj instanceof String) {
22
+ return ValidationScopes[obj];
23
+ } else {
24
+ throw new Error("Received object name is not an instance of String");
25
+ }
26
+ };
27
+ ValidationScopes.validate = function (obj) {
28
+ if (typeof obj !== 'undefined' && obj !== null) {
29
+ switch (obj) {
30
+ case ValidationScopes.DEFAULT:
31
+ return;
32
+ default:
33
+ throw new Error("Invalid : must be ValidationScopes.{ }");
34
+ }
35
+ }
36
+ };
37
+ Object.freeze(ValidationScopes);
38
+ var _default = exports.default = ValidationScopes;
@@ -0,0 +1,13 @@
1
+ export default class ValidationUtils {
2
+ static validateMaximum(value: any, maximum: any): boolean;
3
+ static validateMinimum(value: any, minimum: any): boolean;
4
+ static validateExclusiveMaximum(value: any, eMaximum: any): boolean;
5
+ static validateExclusiveMinimum(value: any, eMinimum: any): boolean;
6
+ static validateMultipleOf(value: any, multipleOf: any): boolean;
7
+ static validateMaxLength(value: any, maxLength: any): boolean;
8
+ static validateMinLength(value: any, minLength: any): boolean;
9
+ static validatePattern(value: any, pattern: any): boolean;
10
+ static validateMaxItems(value: any, maxItems: any): boolean;
11
+ static validateMinItems(value: any, minItems: any): boolean;
12
+ static validateUniqueItems(value: any, uniqueItems: any): boolean;
13
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /*
8
+ * Nutanix Multidomain Versioned APIs
9
+ *
10
+ * OpenAPI spec version: 4.2.1
11
+ *
12
+ * NOTE: This class is auto generated by the Open API Dev Platform.
13
+ *
14
+ * Open API Dev Platform Codegen version: 17.5.0.10128-RELEASE
15
+ *
16
+ * Do not edit the class manually.
17
+ *
18
+ */
19
+
20
+ class ValidationUtils {
21
+ static validateMaximum(value, maximum) {
22
+ return !(maximum === null || value > maximum);
23
+ }
24
+ static validateMinimum(value, minimum) {
25
+ return !(minimum === null || value < minimum);
26
+ }
27
+ static validateExclusiveMaximum(value, eMaximum) {
28
+ return !(eMaximum === null || value > eMaximum);
29
+ }
30
+ static validateExclusiveMinimum(value, eMinimum) {
31
+ return !(eMinimum === null || value > eMinimum);
32
+ }
33
+ static validateMultipleOf(value, multipleOf) {
34
+ return !(multipleOf === null || value % multipleOf === 0);
35
+ }
36
+ static validateMaxLength(value, maxLength) {
37
+ return !(maxLength === null || value.length > maxLength);
38
+ }
39
+ static validateMinLength(value, minLength) {
40
+ return !(minLength === null || value.length < minLength);
41
+ }
42
+ static validatePattern(value, pattern) {
43
+ return !(pattern === null || value.match(pattern) === null);
44
+ }
45
+ static validateMaxItems(value, maxItems) {
46
+ return !(maxItems === null || value.length > maxItems);
47
+ }
48
+ static validateMinItems(value, minItems) {
49
+ return !(minItems === null || value.length < minItems);
50
+ }
51
+ static validateUniqueItems(value, uniqueItems) {
52
+ return !(uniqueItems === null || !uniqueItems || value.length !== new Set(value).size);
53
+ }
54
+ }
55
+ exports.default = ValidationUtils;
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
3
+ * application to use this class directly - the *Api and model classes provide the public API for the service. The
4
+ * contents of this file should be regarded as internal but are documented for completeness.
5
+ * @module ApiClient
6
+ * @version 4.2.1
7
+ */
8
+ export class ApiClient {
9
+ /**
10
+ * Get ETag from an object if exists.
11
+ * The ETag is usually provided in the response of the GET API calls,
12
+ * which can further be used in other HTTP operations.
13
+ *
14
+ * @param object Object from which ETag needs to be retrieved
15
+ * @returns {(String|null)} returns ETag header in the object if it's an API response object, otherwise null
16
+ */
17
+ static getEtag(object: any): (string | null);
18
+ static getValueForCaseInsensitiveKeyMatch(object: any, key: any): any;
19
+ static addEtagReferenceToHeader(bodyParam: any, headerParams: any): void;
20
+ static parseDate(str: any): Date;
21
+ static parseQueryParam(path: any, queryParams: any, param: any, defaultValue: any): any;
22
+ /**
23
+ * Converts a value to the specified type.
24
+ * @param {(String|Object)} data The data to convert, as a string or object.
25
+ * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
26
+ * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
27
+ * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
28
+ * all properties on <code>data<code> will be converted to this type.
29
+ * @returns An instance of the specified type or null or undefined if data is null or undefined.
30
+ */
31
+ static convertToType(data: (string | any), type: (string | Array<string> | any | Function)): any;
32
+ /**
33
+ * Constructs a new map or array model from REST data.
34
+ * @param data {Object|Array} The REST data.
35
+ * @param obj {Object|Array} The target object or array.
36
+ */
37
+ static constructFromObject(data: any | any[], obj: any | any[], itemType: any): void;
38
+ /**
39
+ * URI scheme for connecting to the cluster (HTTP or HTTPS using SSL/TLS)
40
+ * @type {String}
41
+ * @default https
42
+ */
43
+ scheme: string;
44
+ /**
45
+ * The port of the base URL.
46
+ * @type {String}
47
+ * @default 9440
48
+ */
49
+ port: string;
50
+ /**
51
+ * The authentication methods to be included for all API calls.
52
+ * @type {Array.<String>}
53
+ */
54
+ authentications: Array<string>;
55
+ /**
56
+ * The default HTTP headers to be included for all API calls.
57
+ * @type {Array.<String>}
58
+ * @default {}
59
+ */
60
+ defaultHeaders: Array<string>;
61
+ /**
62
+ * The default HTTP read timeout in milliseconds for all API calls.
63
+ * @type {Number}
64
+ * @default 30000
65
+ */
66
+ readTimeout: number;
67
+ /**
68
+ * The default HTTP connection timeout in milliseconds for all API calls.
69
+ * @type {Number}
70
+ * @default 30000
71
+ */
72
+ connectTimeout: number;
73
+ /**
74
+ * If set to false an additional timestamp parameter is added to all API GET calls to
75
+ * prevent browser caching
76
+ * @type {Boolean}
77
+ * @default true
78
+ */
79
+ cache: boolean;
80
+ /**
81
+ * The maximum number of redirects to be followed for all API calls.
82
+ * @type {Number}
83
+ * @default 1
84
+ */
85
+ maxRedirects: number;
86
+ /**
87
+ * The maximum number of retry attempts to be made by the client
88
+ * in case of server error.
89
+ * @type {Number}
90
+ * @default 5
91
+ */
92
+ maxRetryAttempts: number;
93
+ /**
94
+ * The delay period (in milliseconds) between two consecutive retry attempts
95
+ * @type {Number}
96
+ * @default 3000
97
+ */
98
+ retryInterval: number;
99
+ /**
100
+ * A boolean value that indicates whether cross-site Access-Control requests should be made using auth credentials.
101
+ * @type {Boolean}
102
+ * @default false
103
+ */
104
+ withCredentials: boolean;
105
+ agent: any;
106
+ /**
107
+ * Allow user to override superagent agent
108
+ */
109
+ requestAgent: any;
110
+ /**
111
+ * Allow SDK to fetch version info and negotiate version
112
+ */
113
+ allowVersionNegotiation: boolean;
114
+ /**
115
+ * Allow SDK to print debug logs
116
+ */
117
+ debug: boolean;
118
+ /**
119
+ * Username for basic auth
120
+ */
121
+ username: any;
122
+ /**
123
+ * Password for basic auth
124
+ */
125
+ password: any;
126
+ downloadDestination: string;
127
+ /**
128
+ * Configure log file to write activity logs
129
+ * @param logfile The destination file (write stream / string)
130
+ */
131
+ set loggerFile(arg: any);
132
+ /**
133
+ * Enable/Disable SSL Verification
134
+ * @param verifySsl (boolean)
135
+ */
136
+ set verifySsl(arg: boolean);
137
+ get verifySsl(): boolean;
138
+ /**
139
+ * Set the hostname for base URL
140
+ * @param {String} hostname the hostname
141
+ */
142
+ set host(arg: string);
143
+ /**
144
+ * Get the hostname for base URL
145
+ * @returns {String} the hostname
146
+ */
147
+ get host(): string;
148
+ /**
149
+ * Adds key value pair to default headers map, (to be added to every API call request)
150
+ * @param {String} key The key
151
+ * @param {String} value The corresponding value
152
+ */
153
+ addDefaultHeader(key: string, value: string): void;
154
+ paramToString(param: any): any;
155
+ buildUrl(path: any, pathParams: any): string;
156
+ buildCollectionParam(param: any, collectionFormat: any): any;
157
+ setApiKey(key: any): void;
158
+ addEtagToReservedMap(response: any, data: any): any;
159
+ /**
160
+ * Get SDK's negotiated version.
161
+ * @returns {String} negotiated version.
162
+ */
163
+ getNegotiatedVersion(): string;
164
+ /**
165
+ * Call relevant options api and negotiate version
166
+ * Negotiated version available via getNegotiatedVersion()
167
+ * @param {ApiClient} selfInstance
168
+ * @param {Array.<String>} authNames An array of allowed authentication type names i.e. basicAuthScheme
169
+ * @returns {Promise<ApiClient>} a {@link https://www.promisejs.org/|Promise}
170
+ */
171
+ negotiateVersion(selfInstance: ApiClient, authNames: Array<string>): Promise<ApiClient>;
172
+ /**
173
+ * Invokes the REST service using the supplied settings and parameters.
174
+ * @param {String} path The base URL to invoke.
175
+ * @param {String} httpMethod The HTTP method to use.
176
+ * @param {Object.<String, String>} pathParams A map of path parameters and their values.
177
+ * @param {Object.<String, Object>} queryParams A map of query parameters and their values.
178
+ * @param {Object.<String, Object>} headerParams A map of header parameters and their values.
179
+ * @param {Object.<String, Object>} formParams A map of form parameters and their values.
180
+ * @param {Object} bodyParam The value to pass as the request body.
181
+ * @param {Array.<String>} authNames An array of authentication type names.
182
+ * @param {Array.<String>} contentTypes An array of request MIME types.
183
+ * @param {Array.<String>} accepts An array of acceptable response MIME types.
184
+ * @param {(String|Array|Object|Function)} returnType The required type to return; can be a string for simple types or the
185
+ * constructor for a complex type.
186
+ * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
187
+ */
188
+ callApi(path: string, httpMethod: string, pathParams: any, queryParams: any, headerParams: any, formParams: any, bodyParam: any, authNames: Array<string>, contentTypes: Array<string>, accepts: Array<string>, returnType: (string | any[] | any | Function)): Promise<any>;
189
+ callApiInternal(path: any, httpMethod: any, pathParams: any, queryParams: any, headerParams: any, formParams: any, bodyParam: any, authNames: any, contentTypes: any, accepts: any, returnType: any): Promise<any>;
190
+ #private;
191
+ }
192
+ export namespace ApiClient {
193
+ const instance: ApiClient;
194
+ }