@nutanix-scratch/objects-js-client 4.0.1-alpha.2

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 (145) hide show
  1. package/LICENSE.txt +49 -0
  2. package/README.md +200 -0
  3. package/dist/Ntnx-Objects-js-client-prod.js +1 -0
  4. package/dist/Ntnx-Objects-js-client.js +729 -0
  5. package/dist/es/ApiClient.d.ts +159 -0
  6. package/dist/es/ApiClient.js +1211 -0
  7. package/dist/es/Paginable.d.ts +95 -0
  8. package/dist/es/Paginable.js +287 -0
  9. package/dist/es/apis/objectstores-endpoints.d.ts +231 -0
  10. package/dist/es/apis/objectstores-endpoints.js +522 -0
  11. package/dist/es/index.d.ts +64 -0
  12. package/dist/es/index.js +252 -0
  13. package/dist/es/models/common/v1/config/FQDN.d.ts +48 -0
  14. package/dist/es/models/common/v1/config/FQDN.js +242 -0
  15. package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
  16. package/dist/es/models/common/v1/config/Flag.js +275 -0
  17. package/dist/es/models/common/v1/config/IPAddress.d.ts +61 -0
  18. package/dist/es/models/common/v1/config/IPAddress.js +291 -0
  19. package/dist/es/models/common/v1/config/IPv4Address.d.ts +62 -0
  20. package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
  21. package/dist/es/models/common/v1/config/IPv6Address.d.ts +62 -0
  22. package/dist/es/models/common/v1/config/IPv6Address.js +288 -0
  23. package/dist/es/models/common/v1/config/KVPair.d.ts +62 -0
  24. package/dist/es/models/common/v1/config/KVPair.js +332 -0
  25. package/dist/es/models/common/v1/config/Message.d.ts +84 -0
  26. package/dist/es/models/common/v1/config/Message.js +354 -0
  27. package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
  28. package/dist/es/models/common/v1/config/MessageSeverity.js +91 -0
  29. package/dist/es/models/common/v1/config/Metadata.d.ts +98 -0
  30. package/dist/es/models/common/v1/config/Metadata.js +411 -0
  31. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +50 -0
  32. package/dist/es/models/common/v1/config/TenantAwareModel.js +243 -0
  33. package/dist/es/models/common/v1/response/ApiLink.d.ts +62 -0
  34. package/dist/es/models/common/v1/response/ApiLink.js +280 -0
  35. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
  36. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +438 -0
  37. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
  38. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
  39. package/dist/es/models/objects/v4/error/AppMessage.d.ts +108 -0
  40. package/dist/es/models/objects/v4/error/AppMessage.js +432 -0
  41. package/dist/es/models/objects/v4/error/ErrorResponse.d.ts +48 -0
  42. package/dist/es/models/objects/v4/error/ErrorResponse.js +288 -0
  43. package/dist/es/models/objects/v4/error/SchemaValidationError.d.ts +98 -0
  44. package/dist/es/models/objects/v4/error/SchemaValidationError.js +407 -0
  45. package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
  46. package/dist/es/models/objects/v4/error/SchemaValidationErrorMessage.js +318 -0
  47. package/dist/es/models/objects/v4/operations/Certificate.d.ts +78 -0
  48. package/dist/es/models/objects/v4/operations/Certificate.js +411 -0
  49. package/dist/es/models/objects/v4/operations/CertificateApiResponse.d.ts +59 -0
  50. package/dist/es/models/objects/v4/operations/CertificateApiResponse.js +311 -0
  51. package/dist/es/models/objects/v4/operations/CertificateListApiResponse.d.ts +59 -0
  52. package/dist/es/models/objects/v4/operations/CertificateListApiResponse.js +338 -0
  53. package/dist/es/models/objects/v4/operations/CertificateProjection.d.ts +9 -0
  54. package/dist/es/models/objects/v4/operations/CertificateProjection.js +131 -0
  55. package/dist/es/models/objects/v4/operations/Objectstore.d.ts +242 -0
  56. package/dist/es/models/objects/v4/operations/Objectstore.js +945 -0
  57. package/dist/es/models/objects/v4/operations/ObjectstoreApiResponse.d.ts +59 -0
  58. package/dist/es/models/objects/v4/operations/ObjectstoreApiResponse.js +311 -0
  59. package/dist/es/models/objects/v4/operations/ObjectstoreListApiResponse.d.ts +59 -0
  60. package/dist/es/models/objects/v4/operations/ObjectstoreListApiResponse.js +338 -0
  61. package/dist/es/models/objects/v4/operations/ObjectstoreProjection.d.ts +50 -0
  62. package/dist/es/models/objects/v4/operations/ObjectstoreProjection.js +298 -0
  63. package/dist/es/models/objects/v4/operations/StateEnum.d.ts +19 -0
  64. package/dist/es/models/objects/v4/operations/StateEnum.js +145 -0
  65. package/dist/es/models/objects/v4/operations/TaskReferenceApiResponse.d.ts +59 -0
  66. package/dist/es/models/objects/v4/operations/TaskReferenceApiResponse.js +311 -0
  67. package/dist/es/models/prism/v4/config/TaskReference.d.ts +50 -0
  68. package/dist/es/models/prism/v4/config/TaskReference.js +247 -0
  69. package/dist/es/models/validation/ValidationError.d.ts +13 -0
  70. package/dist/es/models/validation/ValidationError.js +60 -0
  71. package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
  72. package/dist/es/models/validation/ValidationScopes.js +38 -0
  73. package/dist/es/utils/ValidationUtils.d.ts +13 -0
  74. package/dist/es/utils/ValidationUtils.js +85 -0
  75. package/dist/lib/ApiClient.d.ts +159 -0
  76. package/dist/lib/ApiClient.js +1211 -0
  77. package/dist/lib/Paginable.d.ts +95 -0
  78. package/dist/lib/Paginable.js +287 -0
  79. package/dist/lib/apis/objectstores-endpoints.d.ts +231 -0
  80. package/dist/lib/apis/objectstores-endpoints.js +522 -0
  81. package/dist/lib/index.d.ts +64 -0
  82. package/dist/lib/index.js +252 -0
  83. package/dist/lib/models/common/v1/config/FQDN.d.ts +48 -0
  84. package/dist/lib/models/common/v1/config/FQDN.js +242 -0
  85. package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
  86. package/dist/lib/models/common/v1/config/Flag.js +275 -0
  87. package/dist/lib/models/common/v1/config/IPAddress.d.ts +61 -0
  88. package/dist/lib/models/common/v1/config/IPAddress.js +291 -0
  89. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +62 -0
  90. package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
  91. package/dist/lib/models/common/v1/config/IPv6Address.d.ts +62 -0
  92. package/dist/lib/models/common/v1/config/IPv6Address.js +288 -0
  93. package/dist/lib/models/common/v1/config/KVPair.d.ts +62 -0
  94. package/dist/lib/models/common/v1/config/KVPair.js +332 -0
  95. package/dist/lib/models/common/v1/config/Message.d.ts +84 -0
  96. package/dist/lib/models/common/v1/config/Message.js +354 -0
  97. package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
  98. package/dist/lib/models/common/v1/config/MessageSeverity.js +91 -0
  99. package/dist/lib/models/common/v1/config/Metadata.d.ts +98 -0
  100. package/dist/lib/models/common/v1/config/Metadata.js +411 -0
  101. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +50 -0
  102. package/dist/lib/models/common/v1/config/TenantAwareModel.js +243 -0
  103. package/dist/lib/models/common/v1/response/ApiLink.d.ts +62 -0
  104. package/dist/lib/models/common/v1/response/ApiLink.js +280 -0
  105. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
  106. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +438 -0
  107. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
  108. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
  109. package/dist/lib/models/objects/v4/error/AppMessage.d.ts +108 -0
  110. package/dist/lib/models/objects/v4/error/AppMessage.js +432 -0
  111. package/dist/lib/models/objects/v4/error/ErrorResponse.d.ts +48 -0
  112. package/dist/lib/models/objects/v4/error/ErrorResponse.js +288 -0
  113. package/dist/lib/models/objects/v4/error/SchemaValidationError.d.ts +98 -0
  114. package/dist/lib/models/objects/v4/error/SchemaValidationError.js +407 -0
  115. package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
  116. package/dist/lib/models/objects/v4/error/SchemaValidationErrorMessage.js +318 -0
  117. package/dist/lib/models/objects/v4/operations/Certificate.d.ts +78 -0
  118. package/dist/lib/models/objects/v4/operations/Certificate.js +411 -0
  119. package/dist/lib/models/objects/v4/operations/CertificateApiResponse.d.ts +59 -0
  120. package/dist/lib/models/objects/v4/operations/CertificateApiResponse.js +311 -0
  121. package/dist/lib/models/objects/v4/operations/CertificateListApiResponse.d.ts +59 -0
  122. package/dist/lib/models/objects/v4/operations/CertificateListApiResponse.js +338 -0
  123. package/dist/lib/models/objects/v4/operations/CertificateProjection.d.ts +9 -0
  124. package/dist/lib/models/objects/v4/operations/CertificateProjection.js +131 -0
  125. package/dist/lib/models/objects/v4/operations/Objectstore.d.ts +242 -0
  126. package/dist/lib/models/objects/v4/operations/Objectstore.js +945 -0
  127. package/dist/lib/models/objects/v4/operations/ObjectstoreApiResponse.d.ts +59 -0
  128. package/dist/lib/models/objects/v4/operations/ObjectstoreApiResponse.js +311 -0
  129. package/dist/lib/models/objects/v4/operations/ObjectstoreListApiResponse.d.ts +59 -0
  130. package/dist/lib/models/objects/v4/operations/ObjectstoreListApiResponse.js +338 -0
  131. package/dist/lib/models/objects/v4/operations/ObjectstoreProjection.d.ts +50 -0
  132. package/dist/lib/models/objects/v4/operations/ObjectstoreProjection.js +298 -0
  133. package/dist/lib/models/objects/v4/operations/StateEnum.d.ts +19 -0
  134. package/dist/lib/models/objects/v4/operations/StateEnum.js +145 -0
  135. package/dist/lib/models/objects/v4/operations/TaskReferenceApiResponse.d.ts +59 -0
  136. package/dist/lib/models/objects/v4/operations/TaskReferenceApiResponse.js +311 -0
  137. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +50 -0
  138. package/dist/lib/models/prism/v4/config/TaskReference.js +247 -0
  139. package/dist/lib/models/validation/ValidationError.d.ts +13 -0
  140. package/dist/lib/models/validation/ValidationError.js +60 -0
  141. package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
  142. package/dist/lib/models/validation/ValidationScopes.js +38 -0
  143. package/dist/lib/utils/ValidationUtils.d.ts +13 -0
  144. package/dist/lib/utils/ValidationUtils.js +85 -0
  145. package/package.json +53 -0
@@ -0,0 +1,159 @@
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.0.1-alpha-2
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 hostname of the URL against which to resolve every API call's (relative) path.
46
+ * @type {String}
47
+ * @default localhost
48
+ */
49
+ host: string;
50
+ /**
51
+ * The port of the base URL.
52
+ * @type {String}
53
+ * @default 9440
54
+ */
55
+ port: string;
56
+ /**
57
+ * The authentication methods to be included for all API calls.
58
+ * @type {Array.<String>}
59
+ */
60
+ authentications: Array<string>;
61
+ /**
62
+ * The default HTTP headers to be included for all API calls.
63
+ * @type {Array.<String>}
64
+ * @default {}
65
+ */
66
+ defaultHeaders: Array<string>;
67
+ /**
68
+ * The default HTTP read timeout in milliseconds for all API calls.
69
+ * @type {Number}
70
+ * @default 30000
71
+ */
72
+ readTimeout: number;
73
+ /**
74
+ * The default HTTP connection timeout in milliseconds for all API calls.
75
+ * @type {Number}
76
+ * @default 30000
77
+ */
78
+ connectTimeout: number;
79
+ /**
80
+ * If set to false an additional timestamp parameter is added to all API GET calls to
81
+ * prevent browser caching
82
+ * @type {Boolean}
83
+ * @default true
84
+ */
85
+ cache: boolean;
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
+ agent: any;
100
+ /**
101
+ * Allow user to override superagent agent
102
+ */
103
+ requestAgent: any;
104
+ /**
105
+ * Allow SDK to print debug logs
106
+ */
107
+ debug: boolean;
108
+ /**
109
+ * Username for basic auth
110
+ */
111
+ username: any;
112
+ /**
113
+ * Password for basic auth
114
+ */
115
+ password: any;
116
+ downloadDestination: string;
117
+ /**
118
+ * Configure log file to write activity logs
119
+ * @param logfile The destination file (write stream / string)
120
+ */
121
+ set loggerFile(arg: any);
122
+ /**
123
+ * Enable/Disable SSL Verification
124
+ * @param verifySsl (boolean)
125
+ */
126
+ set verifySsl(arg: boolean);
127
+ get verifySsl(): boolean;
128
+ /**
129
+ * Adds key value pair to default headers map, (to be added to every API call request)
130
+ * @param {String} key The key
131
+ * @param {String} value The corresponding value
132
+ */
133
+ addDefaultHeader(key: string, value: string): void;
134
+ paramToString(param: any): any;
135
+ buildUrl(path: any, pathParams: any): string;
136
+ buildCollectionParam(param: any, collectionFormat: any): any;
137
+ addEtagToReservedMap(response: any, data: any): any;
138
+ /**
139
+ * Invokes the REST service using the supplied settings and parameters.
140
+ * @param {String} path The base URL to invoke.
141
+ * @param {String} httpMethod The HTTP method to use.
142
+ * @param {Object.<String, String>} pathParams A map of path parameters and their values.
143
+ * @param {Object.<String, Object>} queryParams A map of query parameters and their values.
144
+ * @param {Object.<String, Object>} headerParams A map of header parameters and their values.
145
+ * @param {Object.<String, Object>} formParams A map of form parameters and their values.
146
+ * @param {Object} bodyParam The value to pass as the request body.
147
+ * @param {Array.<String>} authNames An array of authentication type names.
148
+ * @param {Array.<String>} contentTypes An array of request MIME types.
149
+ * @param {Array.<String>} accepts An array of acceptable response MIME types.
150
+ * @param {(String|Array|Object|Function)} returnType The required type to return; can be a string for simple types or the
151
+ * constructor for a complex type.
152
+ * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
153
+ */
154
+ 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>;
155
+ #private;
156
+ }
157
+ export namespace ApiClient {
158
+ const instance: ApiClient;
159
+ }