@pidginhost/sdk 0.2.0

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 (248) hide show
  1. package/.openapi-generator/FILES +223 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +727 -0
  5. package/api.ts +33802 -0
  6. package/base.ts +62 -0
  7. package/common.ts +128 -0
  8. package/configuration.ts +121 -0
  9. package/dist/api.d.ts +15244 -0
  10. package/dist/api.js +30223 -0
  11. package/dist/base.d.ts +42 -0
  12. package/dist/base.js +46 -0
  13. package/dist/common.d.ts +35 -0
  14. package/dist/common.js +140 -0
  15. package/dist/configuration.d.ts +98 -0
  16. package/dist/configuration.js +44 -0
  17. package/dist/esm/api.d.ts +15244 -0
  18. package/dist/esm/api.js +30179 -0
  19. package/dist/esm/base.d.ts +42 -0
  20. package/dist/esm/base.js +41 -0
  21. package/dist/esm/common.d.ts +35 -0
  22. package/dist/esm/common.js +127 -0
  23. package/dist/esm/configuration.d.ts +98 -0
  24. package/dist/esm/configuration.js +40 -0
  25. package/dist/esm/index.d.ts +14 -0
  26. package/dist/esm/index.js +16 -0
  27. package/dist/esm/pidginhost.d.ts +8 -0
  28. package/dist/esm/pidginhost.js +13 -0
  29. package/dist/index.d.ts +14 -0
  30. package/dist/index.js +34 -0
  31. package/dist/pidginhost.d.ts +8 -0
  32. package/dist/pidginhost.js +17 -0
  33. package/docs/APITokenCreate.md +28 -0
  34. package/docs/APITokenList.md +32 -0
  35. package/docs/AccountApi.md +1999 -0
  36. package/docs/ActivateFreeDNS.md +24 -0
  37. package/docs/ActivateFreeDNSResponse.md +24 -0
  38. package/docs/ActivityLogEntry.md +22 -0
  39. package/docs/ActivityLogResponse.md +20 -0
  40. package/docs/AddServerResponse.md +20 -0
  41. package/docs/Address.md +34 -0
  42. package/docs/AttachIPv4.md +20 -0
  43. package/docs/AttachIPv6.md +20 -0
  44. package/docs/AttachVolume.md +20 -0
  45. package/docs/BillingApi.md +1885 -0
  46. package/docs/CancelServiceResponse.md +22 -0
  47. package/docs/ChangeBillingCycle.md +20 -0
  48. package/docs/ChangeBillingCycleResponse.md +22 -0
  49. package/docs/ChangeCompany.md +20 -0
  50. package/docs/ChangeCompanyResponse.md +22 -0
  51. package/docs/ChangePassword.md +20 -0
  52. package/docs/CheckAvailability.md +20 -0
  53. package/docs/CloudApi.md +8433 -0
  54. package/docs/ClusterAdd.md +32 -0
  55. package/docs/ClusterAddResponse.md +20 -0
  56. package/docs/ClusterDetail.md +48 -0
  57. package/docs/ClusterPackage.md +24 -0
  58. package/docs/ClusterType.md +26 -0
  59. package/docs/ClusterTypeEnum.md +11 -0
  60. package/docs/Company.md +36 -0
  61. package/docs/ConnectVMRequest.md +20 -0
  62. package/docs/ConnectVMResponse.md +22 -0
  63. package/docs/ConnectedVM.md +24 -0
  64. package/docs/ConnectedVMsResponse.md +20 -0
  65. package/docs/ConsoleToken.md +22 -0
  66. package/docs/ContactTypeEnum.md +15 -0
  67. package/docs/ContactsUpdate.md +22 -0
  68. package/docs/ContactsUpdateResponse.md +20 -0
  69. package/docs/CountryEnum.md +515 -0
  70. package/docs/DNSRecord.md +53 -0
  71. package/docs/DNSRecordCreate.md +53 -0
  72. package/docs/DNSRecordCreateTypeEnum.md +21 -0
  73. package/docs/DNSRecordMutateResponse.md +22 -0
  74. package/docs/DeactivateFreeDNS.md +22 -0
  75. package/docs/DeactivateFreeDNSResponse.md +20 -0
  76. package/docs/DedicatedApi.md +551 -0
  77. package/docs/DedicatedRDNS.md +22 -0
  78. package/docs/DedicatedServer.md +39 -0
  79. package/docs/DeleteRecord.md +20 -0
  80. package/docs/DeleteRecordResponse.md +22 -0
  81. package/docs/Department.md +22 -0
  82. package/docs/Deposit.md +32 -0
  83. package/docs/DepositCreate.md +20 -0
  84. package/docs/DepositStatusEnum.md +15 -0
  85. package/docs/DestroyProtection.md +20 -0
  86. package/docs/DetachIPv4.md +20 -0
  87. package/docs/DetachIPv4Response.md +20 -0
  88. package/docs/DetachIPv6.md +20 -0
  89. package/docs/DetachIPv6Response.md +20 -0
  90. package/docs/DetachVolume.md +20 -0
  91. package/docs/DisconnectVMRequest.md +20 -0
  92. package/docs/DisconnectVMResponse.md +22 -0
  93. package/docs/Domain.md +42 -0
  94. package/docs/DomainApi.md +2047 -0
  95. package/docs/DomainCancelResponse.md +22 -0
  96. package/docs/DomainCreate.md +24 -0
  97. package/docs/DomainRegistrant.md +44 -0
  98. package/docs/EmailHistory.md +28 -0
  99. package/docs/FeatureUpgradeRequest.md +22 -0
  100. package/docs/FeatureUpgradeResponse.md +22 -0
  101. package/docs/FeaturesEnum.md +17 -0
  102. package/docs/FirewallRule.md +42 -0
  103. package/docs/FirewallRuleDirectionEnum.md +11 -0
  104. package/docs/FirewallRulesSet.md +28 -0
  105. package/docs/FirewallRulesSetStatusEnum.md +13 -0
  106. package/docs/FreeDNSDomain.md +24 -0
  107. package/docs/FreednsApi.md +655 -0
  108. package/docs/FundsBalanceResponse.md +26 -0
  109. package/docs/FundsLog.md +30 -0
  110. package/docs/FwPolicyOutEnum.md +13 -0
  111. package/docs/HTTPRoute.md +45 -0
  112. package/docs/HostingApi.md +327 -0
  113. package/docs/HostingChangePasswordResponse.md +20 -0
  114. package/docs/HostingService.md +39 -0
  115. package/docs/InvoiceDetail.md +50 -0
  116. package/docs/InvoiceList.md +40 -0
  117. package/docs/KubeUpgradeResponse.md +20 -0
  118. package/docs/KubeVersionEnum.md +13 -0
  119. package/docs/KubernetesApi.md +6209 -0
  120. package/docs/LBFirewallRule.md +44 -0
  121. package/docs/LBFirewallRuleActionEnum.md +13 -0
  122. package/docs/LBFirewallRuleDirectionEnum.md +11 -0
  123. package/docs/LowBalanceSettings.md +24 -0
  124. package/docs/NameserversUpdate.md +20 -0
  125. package/docs/NameserversUpdateResponse.md +20 -0
  126. package/docs/NodeMetricsResponse.md +32 -0
  127. package/docs/NodeRRDResponse.md +22 -0
  128. package/docs/NotificationSettingsResponse.md +26 -0
  129. package/docs/OSImage.md +28 -0
  130. package/docs/OperationEnum.md +27 -0
  131. package/docs/PaginatedAPITokenListList.md +26 -0
  132. package/docs/PaginatedClusterDetailList.md +26 -0
  133. package/docs/PaginatedClusterTypeList.md +26 -0
  134. package/docs/PaginatedCompanyList.md +26 -0
  135. package/docs/PaginatedDedicatedServerList.md +26 -0
  136. package/docs/PaginatedDepositList.md +26 -0
  137. package/docs/PaginatedDomainList.md +26 -0
  138. package/docs/PaginatedDomainRegistrantList.md +26 -0
  139. package/docs/PaginatedEmailHistoryList.md +26 -0
  140. package/docs/PaginatedFundsLogList.md +26 -0
  141. package/docs/PaginatedHostingServiceList.md +26 -0
  142. package/docs/PaginatedInvoiceListList.md +26 -0
  143. package/docs/PaginatedLBFirewallRuleList.md +26 -0
  144. package/docs/PaginatedOSImageList.md +26 -0
  145. package/docs/PaginatedPrivateNetworkList.md +26 -0
  146. package/docs/PaginatedPublicIPv4List.md +26 -0
  147. package/docs/PaginatedPublicIPv6List.md +26 -0
  148. package/docs/PaginatedResourcePoolList.md +26 -0
  149. package/docs/PaginatedResourcePoolNodeList.md +26 -0
  150. package/docs/PaginatedSSHKeyList.md +26 -0
  151. package/docs/PaginatedServerList.md +26 -0
  152. package/docs/PaginatedServerProductList.md +26 -0
  153. package/docs/PaginatedServiceListList.md +26 -0
  154. package/docs/PaginatedSnapshotList.md +26 -0
  155. package/docs/PaginatedStorageProductList.md +26 -0
  156. package/docs/PaginatedSubscriptionList.md +26 -0
  157. package/docs/PaginatedTLDList.md +26 -0
  158. package/docs/PaginatedTicketListList.md +26 -0
  159. package/docs/PatchedClusterDetail.md +48 -0
  160. package/docs/PatchedCompany.md +36 -0
  161. package/docs/PatchedDomain.md +42 -0
  162. package/docs/PatchedDomainRegistrant.md +44 -0
  163. package/docs/PatchedFirewallRule.md +42 -0
  164. package/docs/PatchedFirewallRulesSet.md +28 -0
  165. package/docs/PatchedHTTPRoute.md +45 -0
  166. package/docs/PatchedLBFirewallRule.md +44 -0
  167. package/docs/PatchedPrivateNetwork.md +30 -0
  168. package/docs/PatchedProfile.md +26 -0
  169. package/docs/PatchedResourcePool.md +28 -0
  170. package/docs/PatchedSSHKey.md +26 -0
  171. package/docs/PatchedTCPRoute.md +41 -0
  172. package/docs/PatchedUDPRoute.md +41 -0
  173. package/docs/PatchedVolume.md +32 -0
  174. package/docs/PayWithFundsResponse.md +22 -0
  175. package/docs/PowerAction.md +20 -0
  176. package/docs/PowerActionActionEnum.md +15 -0
  177. package/docs/PowerActionResponse.md +20 -0
  178. package/docs/PowerManagement.md +20 -0
  179. package/docs/PowerManagementRequest.md +20 -0
  180. package/docs/PowerManagementRequestActionEnum.md +15 -0
  181. package/docs/Priority3cdEnum.md +13 -0
  182. package/docs/PrivateNetwork.md +30 -0
  183. package/docs/PrivateNetworkAddHost.md +22 -0
  184. package/docs/PrivateNetworkRemoveHost.md +20 -0
  185. package/docs/Profile.md +26 -0
  186. package/docs/PublicIPv4.md +32 -0
  187. package/docs/PublicIPv6.md +32 -0
  188. package/docs/PublicInterface.md +30 -0
  189. package/docs/RDNSUpdateResponse.md +20 -0
  190. package/docs/Reinstall.md +20 -0
  191. package/docs/ReinstallResponse.md +20 -0
  192. package/docs/RemoveServerResponse.md +20 -0
  193. package/docs/RenewDomain.md +20 -0
  194. package/docs/ResourcePool.md +28 -0
  195. package/docs/ResourcePoolAdd.md +22 -0
  196. package/docs/ResourcePoolAddResponse.md +20 -0
  197. package/docs/ResourcePoolNode.md +24 -0
  198. package/docs/RetryProvision.md +20 -0
  199. package/docs/ReverseDNS.md +20 -0
  200. package/docs/SSHKey.md +26 -0
  201. package/docs/SchemaApi.md +117 -0
  202. package/docs/ScopeEnum.md +11 -0
  203. package/docs/Server.md +42 -0
  204. package/docs/ServerAdd.md +58 -0
  205. package/docs/ServerAddResponse.md +20 -0
  206. package/docs/ServerProduct.md +24 -0
  207. package/docs/ServerProductUpgrade.md +20 -0
  208. package/docs/ServerUpgradeResponse.md +20 -0
  209. package/docs/ServerUsageResponse.md +28 -0
  210. package/docs/Service.md +40 -0
  211. package/docs/ServiceList.md +36 -0
  212. package/docs/Snapshot.md +30 -0
  213. package/docs/SnapshotCreate.md +24 -0
  214. package/docs/SnapshotCreateQueued.md +20 -0
  215. package/docs/SnapshotDeleteQueued.md +20 -0
  216. package/docs/SnapshotRollbackQueued.md +20 -0
  217. package/docs/SourceEnum.md +11 -0
  218. package/docs/Status03cEnum.md +21 -0
  219. package/docs/Status63aEnum.md +23 -0
  220. package/docs/StatusA57Enum.md +31 -0
  221. package/docs/StatusEf2Enum.md +15 -0
  222. package/docs/StorageProduct.md +34 -0
  223. package/docs/Subscription.md +34 -0
  224. package/docs/SubscriptionStatusEnum.md +15 -0
  225. package/docs/SupportApi.md +841 -0
  226. package/docs/TCPRoute.md +41 -0
  227. package/docs/TLD.md +38 -0
  228. package/docs/TalosUpgradeResponse.md +20 -0
  229. package/docs/ThresholdTypeEnum.md +13 -0
  230. package/docs/TicketCloseResponse.md +22 -0
  231. package/docs/TicketCreate.md +30 -0
  232. package/docs/TicketCreatePriorityEnum.md +13 -0
  233. package/docs/TicketDetail.md +34 -0
  234. package/docs/TicketList.md +32 -0
  235. package/docs/TicketReopenResponse.md +22 -0
  236. package/docs/TicketReply.md +22 -0
  237. package/docs/TicketReplyResponse.md +20 -0
  238. package/docs/ToggleAutoPaymentResponse.md +22 -0
  239. package/docs/TransferRoDomain.md +22 -0
  240. package/docs/Type2faEnum.md +11 -0
  241. package/docs/UDPRoute.md +41 -0
  242. package/docs/Volume.md +32 -0
  243. package/git_push.sh +57 -0
  244. package/index.ts +19 -0
  245. package/package.json +33 -0
  246. package/pidginhost.ts +20 -0
  247. package/tsconfig.esm.json +7 -0
  248. package/tsconfig.json +18 -0
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Pidgin Host API
3
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0 (v1)
6
+ * Contact: support@pidginhost.com
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 { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ export declare const COLLECTION_FORMATS: {
16
+ csv: string;
17
+ ssv: string;
18
+ tsv: string;
19
+ pipes: string;
20
+ };
21
+ export interface RequestArgs {
22
+ url: string;
23
+ options: RawAxiosRequestConfig;
24
+ }
25
+ export declare class BaseAPI {
26
+ protected basePath: string;
27
+ protected axios: AxiosInstance;
28
+ protected configuration: Configuration | undefined;
29
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
+ }
31
+ export declare class RequiredError extends Error {
32
+ field: string;
33
+ constructor(field: string, msg?: string);
34
+ }
35
+ interface ServerMap {
36
+ [key: string]: {
37
+ url: string;
38
+ description: string;
39
+ }[];
40
+ }
41
+ export declare const operationServerMap: ServerMap;
42
+ export {};
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pidgin Host API
5
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0 (v1)
8
+ * Contact: support@pidginhost.com
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 globalAxios from 'axios';
15
+ export const BASE_PATH = "https://www.pidginhost.com".replace(/\/+$/, "");
16
+ export const COLLECTION_FORMATS = {
17
+ csv: ",",
18
+ ssv: " ",
19
+ tsv: "\t",
20
+ pipes: "|",
21
+ };
22
+ export class BaseAPI {
23
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
24
+ var _a;
25
+ this.basePath = basePath;
26
+ this.axios = axios;
27
+ if (configuration) {
28
+ this.configuration = configuration;
29
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
30
+ }
31
+ }
32
+ }
33
+ ;
34
+ export class RequiredError extends Error {
35
+ constructor(field, msg) {
36
+ super(msg);
37
+ this.field = field;
38
+ this.name = "RequiredError";
39
+ }
40
+ }
41
+ export const operationServerMap = {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Pidgin Host API
3
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0 (v1)
6
+ * Contact: support@pidginhost.com
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 { Configuration } from "./configuration";
13
+ import type { RequestArgs } from "./base";
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
+ import { URL } from 'url';
16
+ export declare const DUMMY_BASE_URL = "https://example.com";
17
+ /**
18
+ *
19
+ * @throws {RequiredError}
20
+ */
21
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
22
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
23
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
24
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
25
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
26
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
27
+ /**
28
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
29
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
30
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
31
+ */
32
+ export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
33
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
34
+ export declare const toPathString: (url: URL) => string;
35
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -0,0 +1,127 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pidgin Host API
5
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0 (v1)
8
+ * Contact: support@pidginhost.com
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import { RequiredError } from "./base";
24
+ import { URLSearchParams } from 'url';
25
+ export const DUMMY_BASE_URL = 'https://example.com';
26
+ /**
27
+ *
28
+ * @throws {RequiredError}
29
+ */
30
+ export const assertParamExists = function (functionName, paramName, paramValue) {
31
+ if (paramValue === null || paramValue === undefined) {
32
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
33
+ }
34
+ };
35
+ export const setApiKeyToObject = function (object, keyParamName, configuration) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (configuration && configuration.apiKey) {
38
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
39
+ ? yield configuration.apiKey(keyParamName)
40
+ : yield configuration.apiKey;
41
+ object[keyParamName] = localVarApiKeyValue;
42
+ }
43
+ });
44
+ };
45
+ export const setBasicAuthToObject = function (object, configuration) {
46
+ if (configuration && (configuration.username || configuration.password)) {
47
+ object["auth"] = { username: configuration.username, password: configuration.password };
48
+ }
49
+ };
50
+ export const setBearerAuthToObject = function (object, configuration) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ if (configuration && configuration.accessToken) {
53
+ const accessToken = typeof configuration.accessToken === 'function'
54
+ ? yield configuration.accessToken()
55
+ : yield configuration.accessToken;
56
+ object["Authorization"] = "Bearer " + accessToken;
57
+ }
58
+ });
59
+ };
60
+ export const setOAuthToObject = function (object, name, scopes, configuration) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ if (configuration && configuration.accessToken) {
63
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
64
+ ? yield configuration.accessToken(name, scopes)
65
+ : yield configuration.accessToken;
66
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
67
+ }
68
+ });
69
+ };
70
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
71
+ if (parameter == null)
72
+ return;
73
+ if (typeof parameter === "object") {
74
+ if (Array.isArray(parameter) || parameter instanceof Set) {
75
+ parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
76
+ }
77
+ else {
78
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
79
+ }
80
+ }
81
+ else {
82
+ if (urlSearchParams.has(key)) {
83
+ urlSearchParams.append(key, parameter);
84
+ }
85
+ else {
86
+ urlSearchParams.set(key, parameter);
87
+ }
88
+ }
89
+ }
90
+ export const setSearchParams = function (url, ...objects) {
91
+ const searchParams = new URLSearchParams(url.search);
92
+ setFlattenedQueryParams(searchParams, objects);
93
+ url.search = searchParams.toString();
94
+ };
95
+ /**
96
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
97
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
98
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
99
+ */
100
+ // @ts-ignore
101
+ export const replaceWithSerializableTypeIfNeeded = function (key, value) {
102
+ if (value instanceof Set) {
103
+ return Array.from(value);
104
+ }
105
+ else {
106
+ return value;
107
+ }
108
+ };
109
+ export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
110
+ const nonString = typeof value !== 'string';
111
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
112
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
113
+ : nonString;
114
+ return needsSerialization
115
+ ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
116
+ : (value || "");
117
+ };
118
+ export const toPathString = function (url) {
119
+ return url.pathname + url.search + url.hash;
120
+ };
121
+ export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
122
+ return (axios = globalAxios, basePath = BASE_PATH) => {
123
+ var _a;
124
+ const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
125
+ return axios.request(axiosRequestArgs);
126
+ };
127
+ };
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Pidgin Host API
3
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0 (v1)
6
+ * Contact: support@pidginhost.com
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
+ interface AWSv4Configuration {
13
+ options?: {
14
+ region?: string;
15
+ service?: string;
16
+ };
17
+ credentials?: {
18
+ accessKeyId?: string;
19
+ secretAccessKey?: string;
20
+ sessionToken?: string;
21
+ };
22
+ }
23
+ export interface ConfigurationParameters {
24
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
25
+ username?: string;
26
+ password?: string;
27
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
28
+ awsv4?: AWSv4Configuration;
29
+ basePath?: string;
30
+ serverIndex?: number;
31
+ baseOptions?: any;
32
+ formDataCtor?: new () => any;
33
+ }
34
+ export declare class Configuration {
35
+ /**
36
+ * parameter for apiKey security
37
+ * @param name security name
38
+ */
39
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
40
+ /**
41
+ * parameter for basic security
42
+ */
43
+ username?: string;
44
+ /**
45
+ * parameter for basic security
46
+ */
47
+ password?: string;
48
+ /**
49
+ * parameter for oauth2 security
50
+ * @param name security name
51
+ * @param scopes oauth2 scope
52
+ */
53
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
54
+ /**
55
+ * parameter for aws4 signature security
56
+ * @param {Object} AWS4Signature - AWS4 Signature security
57
+ * @param {string} options.region - aws region
58
+ * @param {string} options.service - name of the service.
59
+ * @param {string} credentials.accessKeyId - aws access key id
60
+ * @param {string} credentials.secretAccessKey - aws access key
61
+ * @param {string} credentials.sessionToken - aws session token
62
+ * @memberof Configuration
63
+ */
64
+ awsv4?: AWSv4Configuration;
65
+ /**
66
+ * override base path
67
+ */
68
+ basePath?: string;
69
+ /**
70
+ * override server index
71
+ */
72
+ serverIndex?: number;
73
+ /**
74
+ * base options for axios calls
75
+ */
76
+ baseOptions?: any;
77
+ /**
78
+ * The FormData constructor that will be used to create multipart form data
79
+ * requests. You can inject this here so that execution environments that
80
+ * do not support the FormData class can still run the generated client.
81
+ *
82
+ * @type {new () => FormData}
83
+ */
84
+ formDataCtor?: new () => any;
85
+ constructor(param?: ConfigurationParameters);
86
+ /**
87
+ * Check if the given MIME is a JSON MIME.
88
+ * JSON MIME examples:
89
+ * application/json
90
+ * application/json; charset=UTF8
91
+ * APPLICATION/JSON
92
+ * application/vnd.company+json
93
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
94
+ * @return True if the given MIME is JSON, false otherwise.
95
+ */
96
+ isJsonMime(mime: string): boolean;
97
+ }
98
+ export {};
@@ -0,0 +1,40 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * Pidgin Host API
4
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
5
+ *
6
+ * The version of the OpenAPI document: 1.0.0 (v1)
7
+ * Contact: support@pidginhost.com
8
+ *
9
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
+ * https://openapi-generator.tech
11
+ * Do not edit the class manually.
12
+ */
13
+ export class Configuration {
14
+ constructor(param = {}) {
15
+ var _a;
16
+ this.apiKey = param.apiKey;
17
+ this.username = param.username;
18
+ this.password = param.password;
19
+ this.accessToken = param.accessToken;
20
+ this.awsv4 = param.awsv4;
21
+ this.basePath = param.basePath;
22
+ this.serverIndex = param.serverIndex;
23
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
24
+ this.formDataCtor = param.formDataCtor;
25
+ }
26
+ /**
27
+ * Check if the given MIME is a JSON MIME.
28
+ * JSON MIME examples:
29
+ * application/json
30
+ * application/json; charset=UTF8
31
+ * APPLICATION/JSON
32
+ * application/vnd.company+json
33
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
34
+ * @return True if the given MIME is JSON, false otherwise.
35
+ */
36
+ isJsonMime(mime) {
37
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
38
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
39
+ }
40
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pidgin Host API
3
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0 (v1)
6
+ * Contact: support@pidginhost.com
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 * from "./api";
13
+ export * from "./configuration";
14
+ export { PidginHost } from "./pidginhost";
@@ -0,0 +1,16 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pidgin Host API
5
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0 (v1)
8
+ * Contact: support@pidginhost.com
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
+ export * from "./api";
15
+ export * from "./configuration";
16
+ export { PidginHost } from "./pidginhost";
@@ -0,0 +1,8 @@
1
+ import { AccountApi, CloudApi, DomainApi, KubernetesApi } from "./index";
2
+ export declare class PidginHost {
3
+ account: AccountApi;
4
+ cloud: CloudApi;
5
+ domain: DomainApi;
6
+ kubernetes: KubernetesApi;
7
+ constructor(token: string, basePath?: string);
8
+ }
@@ -0,0 +1,13 @@
1
+ import { Configuration, AccountApi, CloudApi, DomainApi, KubernetesApi } from "./index";
2
+ export class PidginHost {
3
+ constructor(token, basePath) {
4
+ const config = new Configuration({
5
+ apiKey: `Token ${token}`,
6
+ basePath,
7
+ });
8
+ this.account = new AccountApi(config);
9
+ this.cloud = new CloudApi(config);
10
+ this.domain = new DomainApi(config);
11
+ this.kubernetes = new KubernetesApi(config);
12
+ }
13
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pidgin Host API
3
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0 (v1)
6
+ * Contact: support@pidginhost.com
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 * from "./api";
13
+ export * from "./configuration";
14
+ export { PidginHost } from "./pidginhost";
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pidgin Host API
6
+ * The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0 (v1)
9
+ * Contact: support@pidginhost.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.PidginHost = void 0;
31
+ __exportStar(require("./api"), exports);
32
+ __exportStar(require("./configuration"), exports);
33
+ var pidginhost_1 = require("./pidginhost");
34
+ Object.defineProperty(exports, "PidginHost", { enumerable: true, get: function () { return pidginhost_1.PidginHost; } });
@@ -0,0 +1,8 @@
1
+ import { AccountApi, CloudApi, DomainApi, KubernetesApi } from "./index";
2
+ export declare class PidginHost {
3
+ account: AccountApi;
4
+ cloud: CloudApi;
5
+ domain: DomainApi;
6
+ kubernetes: KubernetesApi;
7
+ constructor(token: string, basePath?: string);
8
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PidginHost = void 0;
4
+ const index_1 = require("./index");
5
+ class PidginHost {
6
+ constructor(token, basePath) {
7
+ const config = new index_1.Configuration({
8
+ apiKey: `Token ${token}`,
9
+ basePath,
10
+ });
11
+ this.account = new index_1.AccountApi(config);
12
+ this.cloud = new index_1.CloudApi(config);
13
+ this.domain = new index_1.DomainApi(config);
14
+ this.kubernetes = new index_1.KubernetesApi(config);
15
+ }
16
+ }
17
+ exports.PidginHost = PidginHost;
@@ -0,0 +1,28 @@
1
+ # APITokenCreate
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | | [readonly] [default to undefined]
9
+ **name** | **string** | | [default to undefined]
10
+ **scope** | [**ScopeEnum**](ScopeEnum.md) | | [optional] [default to undefined]
11
+ **key** | **string** | | [readonly] [default to undefined]
12
+ **created** | **string** | | [readonly] [default to undefined]
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import { APITokenCreate } from '@pidginhost/sdk';
18
+
19
+ const instance: APITokenCreate = {
20
+ id,
21
+ name,
22
+ scope,
23
+ key,
24
+ created,
25
+ };
26
+ ```
27
+
28
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,32 @@
1
+ # APITokenList
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | | [readonly] [default to undefined]
9
+ **name** | **string** | | [readonly] [default to undefined]
10
+ **scope** | [**ScopeEnum**](ScopeEnum.md) | | [readonly] [default to undefined]
11
+ **key_prefix** | **string** | | [readonly] [default to undefined]
12
+ **created** | **string** | | [readonly] [default to undefined]
13
+ **last_used** | **string** | | [readonly] [default to undefined]
14
+ **request_count** | **number** | | [readonly] [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { APITokenList } from '@pidginhost/sdk';
20
+
21
+ const instance: APITokenList = {
22
+ id,
23
+ name,
24
+ scope,
25
+ key_prefix,
26
+ created,
27
+ last_used,
28
+ request_count,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)