@scaleway/sdk 2.0.0-alpha.11 → 2.0.0-alpha.13

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 (204) hide show
  1. package/package.json +2 -2
  2. package/dist/api/account/index.js +0 -4
  3. package/dist/api/account/v2/api.gen.js +0 -147
  4. package/dist/api/account/v2/index.gen.js +0 -4
  5. package/dist/api/account/v2/marshalling.gen.js +0 -39
  6. package/dist/api/account/v3/api.gen.js +0 -129
  7. package/dist/api/account/v3/index.gen.js +0 -6
  8. package/dist/api/account/v3/marshalling.gen.js +0 -39
  9. package/dist/api/account/v3/validation-rules.gen.js +0 -39
  10. package/dist/api/applesilicon/index.js +0 -2
  11. package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
  12. package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
  13. package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
  14. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
  15. package/dist/api/baremetal/index.js +0 -2
  16. package/dist/api/baremetal/v1/api.gen.js +0 -523
  17. package/dist/api/baremetal/v1/api.utils.js +0 -27
  18. package/dist/api/baremetal/v1/content.gen.js +0 -13
  19. package/dist/api/baremetal/v1/index.js +0 -5
  20. package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
  21. package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
  22. package/dist/api/billing/index.js +0 -2
  23. package/dist/api/billing/v2alpha1/api.gen.js +0 -80
  24. package/dist/api/billing/v2alpha1/index.gen.js +0 -4
  25. package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
  26. package/dist/api/block/index.js +0 -2
  27. package/dist/api/block/v1alpha1/api.gen.js +0 -245
  28. package/dist/api/block/v1alpha1/content.gen.js +0 -13
  29. package/dist/api/block/v1alpha1/index.gen.js +0 -7
  30. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
  31. package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
  32. package/dist/api/cockpit/index.js +0 -2
  33. package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
  34. package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
  35. package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
  36. package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
  37. package/dist/api/container/index.js +0 -2
  38. package/dist/api/container/v1beta1/api.gen.js +0 -549
  39. package/dist/api/container/v1beta1/content.gen.js +0 -22
  40. package/dist/api/container/v1beta1/index.gen.js +0 -5
  41. package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
  42. package/dist/api/document_db/index.js +0 -2
  43. package/dist/api/document_db/v1beta1/api.gen.js +0 -830
  44. package/dist/api/document_db/v1beta1/content.gen.js +0 -19
  45. package/dist/api/document_db/v1beta1/index.gen.js +0 -7
  46. package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
  47. package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
  48. package/dist/api/domain/index.js +0 -2
  49. package/dist/api/domain/v2beta1/api.gen.js +0 -875
  50. package/dist/api/domain/v2beta1/content.gen.js +0 -28
  51. package/dist/api/domain/v2beta1/index.gen.js +0 -7
  52. package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
  53. package/dist/api/flexibleip/index.js +0 -2
  54. package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
  55. package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
  56. package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
  57. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
  58. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
  59. package/dist/api/function/index.js +0 -2
  60. package/dist/api/function/v1beta1/api.gen.js +0 -560
  61. package/dist/api/function/v1beta1/content.gen.js +0 -22
  62. package/dist/api/function/v1beta1/index.gen.js +0 -5
  63. package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
  64. package/dist/api/iam/index.js +0 -2
  65. package/dist/api/iam/v1alpha1/api.gen.js +0 -799
  66. package/dist/api/iam/v1alpha1/index.gen.js +0 -6
  67. package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
  68. package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
  69. package/dist/api/instance/index.js +0 -2
  70. package/dist/api/instance/v1/api.gen.js +0 -1003
  71. package/dist/api/instance/v1/api.utils.js +0 -369
  72. package/dist/api/instance/v1/content.gen.js +0 -31
  73. package/dist/api/instance/v1/index.js +0 -2
  74. package/dist/api/instance/v1/marshalling.gen.js +0 -1206
  75. package/dist/api/instance/v1/marshalling.utils.js +0 -63
  76. package/dist/api/iot/index.js +0 -2
  77. package/dist/api/iot/v1/api.gen.js +0 -581
  78. package/dist/api/iot/v1/content.gen.js +0 -7
  79. package/dist/api/iot/v1/index.gen.js +0 -5
  80. package/dist/api/iot/v1/marshalling.gen.js +0 -388
  81. package/dist/api/ipfs/index.js +0 -2
  82. package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
  83. package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
  84. package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
  85. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
  86. package/dist/api/k8s/index.js +0 -2
  87. package/dist/api/k8s/v1/api.gen.js +0 -454
  88. package/dist/api/k8s/v1/api.utils.js +0 -13
  89. package/dist/api/k8s/v1/content.gen.js +0 -13
  90. package/dist/api/k8s/v1/index.js +0 -4
  91. package/dist/api/k8s/v1/marshalling.gen.js +0 -333
  92. package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
  93. package/dist/api/lb/index.js +0 -2
  94. package/dist/api/lb/v1/api.gen.js +0 -1669
  95. package/dist/api/lb/v1/api.utils.js +0 -81
  96. package/dist/api/lb/v1/content.gen.js +0 -16
  97. package/dist/api/lb/v1/index.js +0 -2
  98. package/dist/api/lb/v1/marshalling.gen.js +0 -923
  99. package/dist/api/marketplace/index.js +0 -4
  100. package/dist/api/marketplace/v1/api.gen.js +0 -60
  101. package/dist/api/marketplace/v1/index.gen.js +0 -4
  102. package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
  103. package/dist/api/marketplace/v2/api.gen.js +0 -162
  104. package/dist/api/marketplace/v2/index.gen.js +0 -4
  105. package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
  106. package/dist/api/mnq/index.js +0 -2
  107. package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
  108. package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
  109. package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
  110. package/dist/api/rdb/index.js +0 -2
  111. package/dist/api/rdb/v1/api.gen.js +0 -972
  112. package/dist/api/rdb/v1/content.gen.js +0 -22
  113. package/dist/api/rdb/v1/index.gen.js +0 -7
  114. package/dist/api/rdb/v1/marshalling.gen.js +0 -636
  115. package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
  116. package/dist/api/redis/index.js +0 -2
  117. package/dist/api/redis/v1/api.gen.js +0 -389
  118. package/dist/api/redis/v1/content.gen.js +0 -7
  119. package/dist/api/redis/v1/index.gen.js +0 -5
  120. package/dist/api/redis/v1/marshalling.gen.js +0 -259
  121. package/dist/api/registry/index.js +0 -2
  122. package/dist/api/registry/v1/api.gen.js +0 -252
  123. package/dist/api/registry/v1/content.gen.js +0 -13
  124. package/dist/api/registry/v1/index.gen.js +0 -5
  125. package/dist/api/registry/v1/marshalling.gen.js +0 -106
  126. package/dist/api/secret/index.js +0 -2
  127. package/dist/api/secret/v1alpha1/api.gen.js +0 -415
  128. package/dist/api/secret/v1alpha1/index.gen.js +0 -4
  129. package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
  130. package/dist/api/tem/index.js +0 -2
  131. package/dist/api/tem/v1alpha1/api.gen.js +0 -229
  132. package/dist/api/tem/v1alpha1/content.gen.js +0 -10
  133. package/dist/api/tem/v1alpha1/index.gen.js +0 -5
  134. package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
  135. package/dist/api/test/index.js +0 -2
  136. package/dist/api/test/v1/api.gen.js +0 -152
  137. package/dist/api/test/v1/content.gen.js +0 -7
  138. package/dist/api/test/v1/index.gen.js +0 -5
  139. package/dist/api/test/v1/marshalling.gen.js +0 -79
  140. package/dist/api/vpc/index.js +0 -4
  141. package/dist/api/vpc/v1/api.gen.js +0 -110
  142. package/dist/api/vpc/v1/index.gen.js +0 -4
  143. package/dist/api/vpc/v1/marshalling.gen.js +0 -44
  144. package/dist/api/vpc/v2/api.gen.js +0 -276
  145. package/dist/api/vpc/v2/index.gen.js +0 -4
  146. package/dist/api/vpc/v2/marshalling.gen.js +0 -135
  147. package/dist/api/vpcgw/index.js +0 -2
  148. package/dist/api/vpcgw/v1/api.gen.js +0 -669
  149. package/dist/api/vpcgw/v1/content.gen.js +0 -10
  150. package/dist/api/vpcgw/v1/index.gen.js +0 -5
  151. package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
  152. package/dist/api/webhosting/index.js +0 -2
  153. package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
  154. package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
  155. package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
  156. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
  157. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
  158. package/dist/helpers/is-browser.js +0 -5
  159. package/dist/helpers/is-response.js +0 -10
  160. package/dist/helpers/json.js +0 -11
  161. package/dist/helpers/marshalling.js +0 -130
  162. package/dist/index.cjs +0 -24364
  163. package/dist/index.d.ts +0 -27584
  164. package/dist/index.js +0 -69
  165. package/dist/internal/async/interval-retrier.js +0 -105
  166. package/dist/internal/async/sleep.js +0 -13
  167. package/dist/internal/interceptors/composer.js +0 -46
  168. package/dist/internal/interceptors/helpers.js +0 -32
  169. package/dist/internal/logger/console-logger.js +0 -38
  170. package/dist/internal/logger/index.js +0 -41
  171. package/dist/internal/logger/level-resolver.js +0 -13
  172. package/dist/internal/validations/string-validation.js +0 -38
  173. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
  174. package/dist/scw/api.js +0 -12
  175. package/dist/scw/auth.js +0 -68
  176. package/dist/scw/client-ini-factory.js +0 -174
  177. package/dist/scw/client-ini-profile.js +0 -54
  178. package/dist/scw/client-settings.js +0 -78
  179. package/dist/scw/client.js +0 -98
  180. package/dist/scw/constants.js +0 -4
  181. package/dist/scw/custom-marshalling.js +0 -131
  182. package/dist/scw/errors/error-parser.js +0 -107
  183. package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
  184. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
  185. package/dist/scw/errors/scw-error.js +0 -66
  186. package/dist/scw/errors/standard/already-exists-error.js +0 -26
  187. package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
  188. package/dist/scw/errors/standard/index.js +0 -13
  189. package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
  190. package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
  191. package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
  192. package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
  193. package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
  194. package/dist/scw/errors/standard/resource-expired-error.js +0 -26
  195. package/dist/scw/errors/standard/resource-locked-error.js +0 -25
  196. package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
  197. package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
  198. package/dist/scw/errors/standard/transient-state-error.js +0 -26
  199. package/dist/scw/errors/types.js +0 -23
  200. package/dist/scw/fetch/build-fetcher.js +0 -72
  201. package/dist/scw/fetch/http-dumper.js +0 -54
  202. package/dist/scw/fetch/http-interceptors.js +0 -99
  203. package/dist/scw/fetch/resource-paginator.js +0 -84
  204. package/dist/scw/fetch/response-parser.js +0 -72
@@ -1,958 +0,0 @@
1
- import { isJSONObject } from '../../../helpers/json.js';
2
- import { unmarshalMoney } from '../../../scw/custom-marshalling.js';
3
- import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf, unmarshalMapOfObject } from '../../../helpers/marshalling.js';
4
-
5
- // This file was automatically generated. DO NOT EDIT.
6
- // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalContactExtensionNL = data => {
8
- if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
10
- }
11
- return {
12
- legalForm: data.legal_form,
13
- legalFormRegistrationNumber: data.legal_form_registration_number
14
- };
15
- };
16
- const unmarshalContactExtensionEU = data => {
17
- if (!isJSONObject(data)) {
18
- throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
19
- }
20
- return {
21
- europeanCitizenship: data.european_citizenship
22
- };
23
- };
24
- const unmarshalContactExtensionFRCodeAuthAfnicInfo = data => {
25
- if (!isJSONObject(data)) {
26
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRCodeAuthAfnicInfo' failed as data isn't a dictionary.`);
27
- }
28
- return {
29
- codeAuthAfnic: data.code_auth_afnic
30
- };
31
- };
32
- const unmarshalContactExtensionFRTrademarkInfo = data => {
33
- if (!isJSONObject(data)) {
34
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
35
- }
36
- return {
37
- trademarkInpi: data.trademark_inpi
38
- };
39
- };
40
- const unmarshalContactExtensionFRAssociationInfo = data => {
41
- if (!isJSONObject(data)) {
42
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
43
- }
44
- return {
45
- publicationJo: unmarshalDate(data.publication_jo),
46
- publicationJoPage: data.publication_jo_page
47
- };
48
- };
49
- const unmarshalContactExtensionFRDunsInfo = data => {
50
- if (!isJSONObject(data)) {
51
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRDunsInfo' failed as data isn't a dictionary.`);
52
- }
53
- return {
54
- dunsId: data.duns_id,
55
- localId: data.local_id
56
- };
57
- };
58
- const unmarshalContactExtensionFRIndividualInfo = data => {
59
- if (!isJSONObject(data)) {
60
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRIndividualInfo' failed as data isn't a dictionary.`);
61
- }
62
- return {
63
- whoisOptIn: data.whois_opt_in
64
- };
65
- };
66
- const unmarshalContactExtensionFR = data => {
67
- if (!isJSONObject(data)) {
68
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFR' failed as data isn't a dictionary.`);
69
- }
70
- return {
71
- associationInfo: data.association_info ? unmarshalContactExtensionFRAssociationInfo(data.association_info) : undefined,
72
- codeAuthAfnicInfo: data.code_auth_afnic_info ? unmarshalContactExtensionFRCodeAuthAfnicInfo(data.code_auth_afnic_info) : undefined,
73
- dunsInfo: data.duns_info ? unmarshalContactExtensionFRDunsInfo(data.duns_info) : undefined,
74
- individualInfo: data.individual_info ? unmarshalContactExtensionFRIndividualInfo(data.individual_info) : undefined,
75
- mode: data.mode,
76
- trademarkInfo: data.trademark_info ? unmarshalContactExtensionFRTrademarkInfo(data.trademark_info) : undefined
77
- };
78
- };
79
- const unmarshalContactQuestion = data => {
80
- if (!isJSONObject(data)) {
81
- throw new TypeError(`Unmarshalling the type 'ContactQuestion' failed as data isn't a dictionary.`);
82
- }
83
- return {
84
- answer: data.answer,
85
- question: data.question
86
- };
87
- };
88
- const unmarshalContact = data => {
89
- if (!isJSONObject(data)) {
90
- throw new TypeError(`Unmarshalling the type 'Contact' failed as data isn't a dictionary.`);
91
- }
92
- return {
93
- addressLine1: data.address_line_1,
94
- addressLine2: data.address_line_2,
95
- city: data.city,
96
- companyIdentificationCode: data.company_identification_code,
97
- companyName: data.company_name,
98
- country: data.country,
99
- email: data.email,
100
- emailAlt: data.email_alt,
101
- emailStatus: data.email_status,
102
- extensionEu: unmarshalContactExtensionEU(data.extension_eu),
103
- extensionFr: unmarshalContactExtensionFR(data.extension_fr),
104
- extensionNl: unmarshalContactExtensionNL(data.extension_nl),
105
- faxNumber: data.fax_number,
106
- firstname: data.firstname,
107
- id: data.id,
108
- lang: data.lang,
109
- lastname: data.lastname,
110
- legalForm: data.legal_form,
111
- phoneNumber: data.phone_number,
112
- questions: data.questions ? unmarshalArrayOfObject(data.questions, unmarshalContactQuestion) : undefined,
113
- resale: data.resale,
114
- state: data.state,
115
- vatIdentificationCode: data.vat_identification_code,
116
- whoisOptIn: data.whois_opt_in,
117
- zip: data.zip
118
- };
119
- };
120
- const unmarshalDNSZone = data => {
121
- if (!isJSONObject(data)) {
122
- throw new TypeError(`Unmarshalling the type 'DNSZone' failed as data isn't a dictionary.`);
123
- }
124
- return {
125
- domain: data.domain,
126
- message: data.message ? data.message : undefined,
127
- ns: data.ns,
128
- nsDefault: data.ns_default,
129
- nsMaster: data.ns_master,
130
- projectId: data.project_id,
131
- status: data.status,
132
- subdomain: data.subdomain,
133
- updatedAt: unmarshalDate(data.updated_at)
134
- };
135
- };
136
- const unmarshalHost = data => {
137
- if (!isJSONObject(data)) {
138
- throw new TypeError(`Unmarshalling the type 'Host' failed as data isn't a dictionary.`);
139
- }
140
- return {
141
- domain: data.domain,
142
- ips: data.ips,
143
- name: data.name,
144
- status: data.status
145
- };
146
- };
147
- const unmarshalSSLCertificate = data => {
148
- if (!isJSONObject(data)) {
149
- throw new TypeError(`Unmarshalling the type 'SSLCertificate' failed as data isn't a dictionary.`);
150
- }
151
- return {
152
- alternativeDnsZones: data.alternative_dns_zones,
153
- certificateChain: data.certificate_chain,
154
- createdAt: unmarshalDate(data.created_at),
155
- dnsZone: data.dns_zone,
156
- expiredAt: unmarshalDate(data.expired_at),
157
- privateKey: data.private_key,
158
- status: data.status
159
- };
160
- };
161
- const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
162
- if (!isJSONObject(data)) {
163
- throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
164
- }
165
- return {
166
- compatible: data.compatible,
167
- errorMessage: data.error_message ? data.error_message : undefined
168
- };
169
- };
170
- const unmarshalCheckContactsCompatibilityResponse = data => {
171
- if (!isJSONObject(data)) {
172
- throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
173
- }
174
- return {
175
- administrativeCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result),
176
- compatible: data.compatible,
177
- ownerCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result),
178
- technicalCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result)
179
- };
180
- };
181
- const unmarshalClearDNSZoneRecordsResponse = data => {
182
- if (!isJSONObject(data)) {
183
- throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
184
- }
185
- return {};
186
- };
187
- const unmarshalDeleteDNSZoneResponse = data => {
188
- if (!isJSONObject(data)) {
189
- throw new TypeError(`Unmarshalling the type 'DeleteDNSZoneResponse' failed as data isn't a dictionary.`);
190
- }
191
- return {};
192
- };
193
- const unmarshalDeleteExternalDomainResponse = data => {
194
- if (!isJSONObject(data)) {
195
- throw new TypeError(`Unmarshalling the type 'DeleteExternalDomainResponse' failed as data isn't a dictionary.`);
196
- }
197
- return {};
198
- };
199
- const unmarshalDeleteSSLCertificateResponse = data => {
200
- if (!isJSONObject(data)) {
201
- throw new TypeError(`Unmarshalling the type 'DeleteSSLCertificateResponse' failed as data isn't a dictionary.`);
202
- }
203
- return {};
204
- };
205
- const unmarshalTldOffer = data => {
206
- if (!isJSONObject(data)) {
207
- throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
208
- }
209
- return {
210
- action: data.action,
211
- operationPath: data.operation_path,
212
- price: data.price ? unmarshalMoney(data.price) : undefined
213
- };
214
- };
215
- const unmarshalTld = data => {
216
- if (!isJSONObject(data)) {
217
- throw new TypeError(`Unmarshalling the type 'Tld' failed as data isn't a dictionary.`);
218
- }
219
- return {
220
- dnssecSupport: data.dnssec_support,
221
- durationInYearsMax: data.duration_in_years_max,
222
- durationInYearsMin: data.duration_in_years_min,
223
- idnSupport: data.idn_support,
224
- name: data.name,
225
- offers: unmarshalMapOfObject(data.offers, unmarshalTldOffer),
226
- specifications: data.specifications
227
- };
228
- };
229
- const unmarshalDomainRegistrationStatusTransfer = data => {
230
- if (!isJSONObject(data)) {
231
- throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
232
- }
233
- return {
234
- status: data.status,
235
- voteCurrentOwner: data.vote_current_owner,
236
- voteNewOwner: data.vote_new_owner
237
- };
238
- };
239
- const unmarshalDomainRegistrationStatusExternalDomain = data => {
240
- if (!isJSONObject(data)) {
241
- throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
242
- }
243
- return {
244
- validationToken: data.validation_token
245
- };
246
- };
247
- const unmarshalDSRecordPublicKey = data => {
248
- if (!isJSONObject(data)) {
249
- throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
250
- }
251
- return {
252
- key: data.key
253
- };
254
- };
255
- const unmarshalDSRecordDigest = data => {
256
- if (!isJSONObject(data)) {
257
- throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
258
- }
259
- return {
260
- digest: data.digest,
261
- publicKey: unmarshalDSRecordPublicKey(data.public_key),
262
- type: data.type
263
- };
264
- };
265
- const unmarshalDSRecord = data => {
266
- if (!isJSONObject(data)) {
267
- throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
268
- }
269
- return {
270
- algorithm: data.algorithm,
271
- digest: data.digest ? unmarshalDSRecordDigest(data.digest) : undefined,
272
- keyId: data.key_id,
273
- publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined
274
- };
275
- };
276
- const unmarshalDomainDNSSEC = data => {
277
- if (!isJSONObject(data)) {
278
- throw new TypeError(`Unmarshalling the type 'DomainDNSSEC' failed as data isn't a dictionary.`);
279
- }
280
- return {
281
- dsRecords: unmarshalArrayOfObject(data.ds_records, unmarshalDSRecord),
282
- status: data.status
283
- };
284
- };
285
- const unmarshalDomain = data => {
286
- if (!isJSONObject(data)) {
287
- throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
288
- }
289
- return {
290
- administrativeContact: unmarshalContact(data.administrative_contact),
291
- autoRenewStatus: data.auto_renew_status,
292
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
293
- dnssec: unmarshalDomainDNSSEC(data.dnssec),
294
- domain: data.domain,
295
- eppCode: data.epp_code,
296
- expiredAt: unmarshalDate(data.expired_at),
297
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
298
- isExternal: data.is_external,
299
- organizationId: data.organization_id,
300
- ownerContact: unmarshalContact(data.owner_contact),
301
- projectId: data.project_id,
302
- registrar: data.registrar,
303
- status: data.status,
304
- technicalContact: unmarshalContact(data.technical_contact),
305
- tld: unmarshalTld(data.tld),
306
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
307
- updatedAt: unmarshalDate(data.updated_at)
308
- };
309
- };
310
- const unmarshalGetDNSZoneTsigKeyResponse = data => {
311
- if (!isJSONObject(data)) {
312
- throw new TypeError(`Unmarshalling the type 'GetDNSZoneTsigKeyResponse' failed as data isn't a dictionary.`);
313
- }
314
- return {
315
- algorithm: data.algorithm,
316
- key: data.key,
317
- name: data.name
318
- };
319
- };
320
- const unmarshalRecordChangeClear = data => {
321
- if (!isJSONObject(data)) {
322
- throw new TypeError(`Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`);
323
- }
324
- return {};
325
- };
326
- const unmarshalRecordChangeDelete = data => {
327
- if (!isJSONObject(data)) {
328
- throw new TypeError(`Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`);
329
- }
330
- return {
331
- id: data.id ? data.id : undefined,
332
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined
333
- };
334
- };
335
- const unmarshalRecordIdentifier = data => {
336
- if (!isJSONObject(data)) {
337
- throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
338
- }
339
- return {
340
- data: data.data ? data.data : undefined,
341
- name: data.name,
342
- ttl: data.ttl ? data.ttl : undefined,
343
- type: data.type
344
- };
345
- };
346
- const unmarshalRecordChangeSet = data => {
347
- if (!isJSONObject(data)) {
348
- throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
349
- }
350
- return {
351
- id: data.id ? data.id : undefined,
352
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined,
353
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
354
- };
355
- };
356
- const unmarshalDomainRecordViewConfigView = data => {
357
- if (!isJSONObject(data)) {
358
- throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfigView' failed as data isn't a dictionary.`);
359
- }
360
- return {
361
- data: data.data,
362
- subnet: data.subnet
363
- };
364
- };
365
- const unmarshalDomainRecordViewConfig = data => {
366
- if (!isJSONObject(data)) {
367
- throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
368
- }
369
- return {
370
- views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
371
- };
372
- };
373
- const unmarshalDomainRecordWeightedConfigWeightedIP = data => {
374
- if (!isJSONObject(data)) {
375
- throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`);
376
- }
377
- return {
378
- ip: data.ip,
379
- weight: data.weight
380
- };
381
- };
382
- const unmarshalDomainRecordWeightedConfig = data => {
383
- if (!isJSONObject(data)) {
384
- throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
385
- }
386
- return {
387
- weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
388
- };
389
- };
390
- const unmarshalDomainRecordHTTPServiceConfig = data => {
391
- if (!isJSONObject(data)) {
392
- throw new TypeError(`Unmarshalling the type 'DomainRecordHTTPServiceConfig' failed as data isn't a dictionary.`);
393
- }
394
- return {
395
- ips: data.ips,
396
- mustContain: data.must_contain ? data.must_contain : undefined,
397
- strategy: data.strategy,
398
- url: data.url,
399
- userAgent: data.user_agent ? data.user_agent : undefined
400
- };
401
- };
402
- const unmarshalDomainRecordGeoIPConfigMatch = data => {
403
- if (!isJSONObject(data)) {
404
- throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
405
- }
406
- return {
407
- continents: data.continents,
408
- countries: data.countries,
409
- data: data.data
410
- };
411
- };
412
- const unmarshalDomainRecordGeoIPConfig = data => {
413
- if (!isJSONObject(data)) {
414
- throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
415
- }
416
- return {
417
- default: data.default,
418
- matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
419
- };
420
- };
421
- const unmarshalDomainRecord = data => {
422
- if (!isJSONObject(data)) {
423
- throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
424
- }
425
- return {
426
- comment: data.comment ? data.comment : undefined,
427
- data: data.data,
428
- geoIpConfig: data.geo_ip_config ? unmarshalDomainRecordGeoIPConfig(data.geo_ip_config) : undefined,
429
- httpServiceConfig: data.http_service_config ? unmarshalDomainRecordHTTPServiceConfig(data.http_service_config) : undefined,
430
- id: data.id,
431
- name: data.name,
432
- priority: data.priority,
433
- ttl: data.ttl,
434
- type: data.type,
435
- viewConfig: data.view_config ? unmarshalDomainRecordViewConfig(data.view_config) : undefined,
436
- weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : undefined
437
- };
438
- };
439
- const unmarshalRecordChangeAdd = data => {
440
- if (!isJSONObject(data)) {
441
- throw new TypeError(`Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`);
442
- }
443
- return {
444
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
445
- };
446
- };
447
- const unmarshalRecordChange = data => {
448
- if (!isJSONObject(data)) {
449
- throw new TypeError(`Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`);
450
- }
451
- return {
452
- add: data.add ? unmarshalRecordChangeAdd(data.add) : undefined,
453
- clear: data.clear ? unmarshalRecordChangeClear(data.clear) : undefined,
454
- delete: data.delete ? unmarshalRecordChangeDelete(data.delete) : undefined,
455
- set: data.set ? unmarshalRecordChangeSet(data.set) : undefined
456
- };
457
- };
458
- const unmarshalGetDNSZoneVersionDiffResponse = data => {
459
- if (!isJSONObject(data)) {
460
- throw new TypeError(`Unmarshalling the type 'GetDNSZoneVersionDiffResponse' failed as data isn't a dictionary.`);
461
- }
462
- return {
463
- changes: unmarshalArrayOfObject(data.changes, unmarshalRecordChange)
464
- };
465
- };
466
- const unmarshalGetDomainAuthCodeResponse = data => {
467
- if (!isJSONObject(data)) {
468
- throw new TypeError(`Unmarshalling the type 'GetDomainAuthCodeResponse' failed as data isn't a dictionary.`);
469
- }
470
- return {
471
- authCode: data.auth_code
472
- };
473
- };
474
- const unmarshalImportProviderDNSZoneResponse = data => {
475
- if (!isJSONObject(data)) {
476
- throw new TypeError(`Unmarshalling the type 'ImportProviderDNSZoneResponse' failed as data isn't a dictionary.`);
477
- }
478
- return {
479
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
480
- };
481
- };
482
- const unmarshalImportRawDNSZoneResponse = data => {
483
- if (!isJSONObject(data)) {
484
- throw new TypeError(`Unmarshalling the type 'ImportRawDNSZoneResponse' failed as data isn't a dictionary.`);
485
- }
486
- return {
487
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
488
- };
489
- };
490
- const unmarshalContactRolesRoles = data => {
491
- if (!isJSONObject(data)) {
492
- throw new TypeError(`Unmarshalling the type 'ContactRolesRoles' failed as data isn't a dictionary.`);
493
- }
494
- return {
495
- isAdministrative: data.is_administrative,
496
- isOwner: data.is_owner,
497
- isTechnical: data.is_technical
498
- };
499
- };
500
- const unmarshalContactRoles = data => {
501
- if (!isJSONObject(data)) {
502
- throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
503
- }
504
- return {
505
- contact: unmarshalContact(data.contact),
506
- roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
507
- };
508
- };
509
- const unmarshalListContactsResponse = data => {
510
- if (!isJSONObject(data)) {
511
- throw new TypeError(`Unmarshalling the type 'ListContactsResponse' failed as data isn't a dictionary.`);
512
- }
513
- return {
514
- contacts: unmarshalArrayOfObject(data.contacts, unmarshalContactRoles),
515
- totalCount: data.total_count
516
- };
517
- };
518
- const unmarshalNameserver = data => {
519
- if (!isJSONObject(data)) {
520
- throw new TypeError(`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`);
521
- }
522
- return {
523
- ip: data.ip,
524
- name: data.name
525
- };
526
- };
527
- const unmarshalListDNSZoneNameserversResponse = data => {
528
- if (!isJSONObject(data)) {
529
- throw new TypeError(`Unmarshalling the type 'ListDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
530
- }
531
- return {
532
- ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver)
533
- };
534
- };
535
- const unmarshalListDNSZoneRecordsResponse = data => {
536
- if (!isJSONObject(data)) {
537
- throw new TypeError(`Unmarshalling the type 'ListDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
538
- }
539
- return {
540
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
541
- totalCount: data.total_count
542
- };
543
- };
544
- const unmarshalListDNSZoneVersionRecordsResponse = data => {
545
- if (!isJSONObject(data)) {
546
- throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionRecordsResponse' failed as data isn't a dictionary.`);
547
- }
548
- return {
549
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
550
- totalCount: data.total_count
551
- };
552
- };
553
- const unmarshalDNSZoneVersion = data => {
554
- if (!isJSONObject(data)) {
555
- throw new TypeError(`Unmarshalling the type 'DNSZoneVersion' failed as data isn't a dictionary.`);
556
- }
557
- return {
558
- createdAt: unmarshalDate(data.created_at),
559
- id: data.id
560
- };
561
- };
562
- const unmarshalListDNSZoneVersionsResponse = data => {
563
- if (!isJSONObject(data)) {
564
- throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionsResponse' failed as data isn't a dictionary.`);
565
- }
566
- return {
567
- totalCount: data.total_count,
568
- versions: unmarshalArrayOfObject(data.versions, unmarshalDNSZoneVersion)
569
- };
570
- };
571
- const unmarshalListDNSZonesResponse = data => {
572
- if (!isJSONObject(data)) {
573
- throw new TypeError(`Unmarshalling the type 'ListDNSZonesResponse' failed as data isn't a dictionary.`);
574
- }
575
- return {
576
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
577
- totalCount: data.total_count
578
- };
579
- };
580
- const unmarshalListDomainHostsResponse = data => {
581
- if (!isJSONObject(data)) {
582
- throw new TypeError(`Unmarshalling the type 'ListDomainHostsResponse' failed as data isn't a dictionary.`);
583
- }
584
- return {
585
- hosts: unmarshalArrayOfObject(data.hosts, unmarshalHost),
586
- totalCount: data.total_count
587
- };
588
- };
589
- const unmarshalDomainSummary = data => {
590
- if (!isJSONObject(data)) {
591
- throw new TypeError(`Unmarshalling the type 'DomainSummary' failed as data isn't a dictionary.`);
592
- }
593
- return {
594
- autoRenewStatus: data.auto_renew_status,
595
- dnssecStatus: data.dnssec_status,
596
- domain: data.domain,
597
- eppCode: data.epp_code,
598
- expiredAt: unmarshalDate(data.expired_at),
599
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
600
- isExternal: data.is_external,
601
- organizationId: data.organization_id,
602
- projectId: data.project_id,
603
- registrar: data.registrar,
604
- status: data.status,
605
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
606
- updatedAt: unmarshalDate(data.updated_at)
607
- };
608
- };
609
- const unmarshalListDomainsResponse = data => {
610
- if (!isJSONObject(data)) {
611
- throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
612
- }
613
- return {
614
- domains: unmarshalArrayOfObject(data.domains, unmarshalDomainSummary),
615
- totalCount: data.total_count
616
- };
617
- };
618
- const unmarshalRenewableDomain = data => {
619
- if (!isJSONObject(data)) {
620
- throw new TypeError(`Unmarshalling the type 'RenewableDomain' failed as data isn't a dictionary.`);
621
- }
622
- return {
623
- domain: data.domain,
624
- estimatedDeleteAt: unmarshalDate(data.estimated_delete_at),
625
- expiredAt: unmarshalDate(data.expired_at),
626
- limitRedemptionAt: unmarshalDate(data.limit_redemption_at),
627
- limitRenewAt: unmarshalDate(data.limit_renew_at),
628
- organizationId: data.organization_id,
629
- projectId: data.project_id,
630
- renewableDurationInYears: data.renewable_duration_in_years ? data.renewable_duration_in_years : undefined,
631
- status: data.status,
632
- tld: unmarshalTld(data.tld)
633
- };
634
- };
635
- const unmarshalListRenewableDomainsResponse = data => {
636
- if (!isJSONObject(data)) {
637
- throw new TypeError(`Unmarshalling the type 'ListRenewableDomainsResponse' failed as data isn't a dictionary.`);
638
- }
639
- return {
640
- domains: unmarshalArrayOfObject(data.domains, unmarshalRenewableDomain),
641
- totalCount: data.total_count
642
- };
643
- };
644
- const unmarshalListSSLCertificatesResponse = data => {
645
- if (!isJSONObject(data)) {
646
- throw new TypeError(`Unmarshalling the type 'ListSSLCertificatesResponse' failed as data isn't a dictionary.`);
647
- }
648
- return {
649
- certificates: unmarshalArrayOfObject(data.certificates, unmarshalSSLCertificate),
650
- totalCount: data.total_count
651
- };
652
- };
653
- const unmarshalTask = data => {
654
- if (!isJSONObject(data)) {
655
- throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
656
- }
657
- return {
658
- domain: data.domain ? data.domain : undefined,
659
- id: data.id,
660
- message: data.message ? data.message : undefined,
661
- organizationId: data.organization_id,
662
- projectId: data.project_id,
663
- startedAt: unmarshalDate(data.started_at),
664
- status: data.status,
665
- type: data.type,
666
- updatedAt: unmarshalDate(data.updated_at)
667
- };
668
- };
669
- const unmarshalListTasksResponse = data => {
670
- if (!isJSONObject(data)) {
671
- throw new TypeError(`Unmarshalling the type 'ListTasksResponse' failed as data isn't a dictionary.`);
672
- }
673
- return {
674
- tasks: unmarshalArrayOfObject(data.tasks, unmarshalTask),
675
- totalCount: data.total_count
676
- };
677
- };
678
- const unmarshalListTldsResponse = data => {
679
- if (!isJSONObject(data)) {
680
- throw new TypeError(`Unmarshalling the type 'ListTldsResponse' failed as data isn't a dictionary.`);
681
- }
682
- return {
683
- tlds: unmarshalArrayOfObject(data.tlds, unmarshalTld),
684
- totalCount: data.total_count
685
- };
686
- };
687
- const unmarshalOrderResponse = data => {
688
- if (!isJSONObject(data)) {
689
- throw new TypeError(`Unmarshalling the type 'OrderResponse' failed as data isn't a dictionary.`);
690
- }
691
- return {
692
- createdAt: unmarshalDate(data.created_at),
693
- domains: data.domains,
694
- organizationId: data.organization_id,
695
- projectId: data.project_id,
696
- taskId: data.task_id
697
- };
698
- };
699
- const unmarshalRefreshDNSZoneResponse = data => {
700
- if (!isJSONObject(data)) {
701
- throw new TypeError(`Unmarshalling the type 'RefreshDNSZoneResponse' failed as data isn't a dictionary.`);
702
- }
703
- return {
704
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone)
705
- };
706
- };
707
- const unmarshalRegisterExternalDomainResponse = data => {
708
- if (!isJSONObject(data)) {
709
- throw new TypeError(`Unmarshalling the type 'RegisterExternalDomainResponse' failed as data isn't a dictionary.`);
710
- }
711
- return {
712
- createdAt: unmarshalDate(data.created_at),
713
- domain: data.domain,
714
- organizationId: data.organization_id,
715
- projectId: data.project_id,
716
- validationToken: data.validation_token
717
- };
718
- };
719
- const unmarshalRestoreDNSZoneVersionResponse = data => {
720
- if (!isJSONObject(data)) {
721
- throw new TypeError(`Unmarshalling the type 'RestoreDNSZoneVersionResponse' failed as data isn't a dictionary.`);
722
- }
723
- return {};
724
- };
725
- const unmarshalAvailableDomain = data => {
726
- if (!isJSONObject(data)) {
727
- throw new TypeError(`Unmarshalling the type 'AvailableDomain' failed as data isn't a dictionary.`);
728
- }
729
- return {
730
- available: data.available,
731
- domain: data.domain,
732
- tld: unmarshalTld(data.tld)
733
- };
734
- };
735
- const unmarshalSearchAvailableDomainsResponse = data => {
736
- if (!isJSONObject(data)) {
737
- throw new TypeError(`Unmarshalling the type 'SearchAvailableDomainsResponse' failed as data isn't a dictionary.`);
738
- }
739
- return {
740
- availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain)
741
- };
742
- };
743
- const unmarshalUpdateDNSZoneNameserversResponse = data => {
744
- if (!isJSONObject(data)) {
745
- throw new TypeError(`Unmarshalling the type 'UpdateDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
746
- }
747
- return {
748
- ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver)
749
- };
750
- };
751
- const unmarshalUpdateDNSZoneRecordsResponse = data => {
752
- if (!isJSONObject(data)) {
753
- throw new TypeError(`Unmarshalling the type 'UpdateDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
754
- }
755
- return {
756
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
757
- };
758
- };
759
- const marshalCloneDNSZoneRequest = (request, defaults) => ({
760
- dest_dns_zone: request.destDnsZone,
761
- overwrite: request.overwrite,
762
- project_id: request.projectId
763
- });
764
- const marshalCreateDNSZoneRequest = (request, defaults) => ({
765
- domain: request.domain,
766
- project_id: request.projectId ?? defaults.defaultProjectId,
767
- subdomain: request.subdomain
768
- });
769
- const marshalCreateSSLCertificateRequest = (request, defaults) => ({
770
- alternative_dns_zones: request.alternativeDnsZones,
771
- dns_zone: request.dnsZone
772
- });
773
- const marshalImportProviderDNSZoneRequest = (request, defaults) => ({
774
- ...resolveOneOf([{
775
- param: 'online_v1',
776
- value: request.onlineV1
777
- }])
778
- });
779
- const marshalImportRawDNSZoneRequest = (request, defaults) => ({
780
- content: request.content,
781
- format: request.format,
782
- project_id: request.projectId ?? defaults.defaultProjectId,
783
- ...resolveOneOf([{
784
- param: 'axfr_source',
785
- value: request.axfrSource
786
- }, {
787
- param: 'bind_source',
788
- value: request.bindSource
789
- }])
790
- });
791
- const marshalRefreshDNSZoneRequest = (request, defaults) => ({
792
- recreate_dns_zone: request.recreateDnsZone,
793
- recreate_sub_dns_zone: request.recreateSubDnsZone
794
- });
795
- const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
796
- domains: request.domains,
797
- duration_in_years: request.durationInYears,
798
- project_id: request.projectId ?? defaults.defaultProjectId,
799
- ...resolveOneOf([{
800
- param: 'owner_contact',
801
- value: request.ownerContact
802
- }, {
803
- param: 'owner_contact_id',
804
- value: request.ownerContactId
805
- }]),
806
- ...resolveOneOf([{
807
- param: 'administrative_contact',
808
- value: request.administrativeContact
809
- }, {
810
- param: 'administrative_contact_id',
811
- value: request.administrativeContactId
812
- }]),
813
- ...resolveOneOf([{
814
- param: 'technical_contact',
815
- value: request.technicalContact
816
- }, {
817
- param: 'technical_contact_id',
818
- value: request.technicalContactId
819
- }])
820
- });
821
- const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({
822
- domains: request.domains,
823
- tlds: request.tlds,
824
- ...resolveOneOf([{
825
- param: 'owner_contact',
826
- value: request.ownerContact
827
- }, {
828
- param: 'owner_contact_id',
829
- value: request.ownerContactId
830
- }]),
831
- ...resolveOneOf([{
832
- param: 'administrative_contact',
833
- value: request.administrativeContact
834
- }, {
835
- param: 'administrative_contact_id',
836
- value: request.administrativeContactId
837
- }]),
838
- ...resolveOneOf([{
839
- param: 'technical_contact',
840
- value: request.technicalContact
841
- }, {
842
- param: 'technical_contact_id',
843
- value: request.technicalContactId
844
- }])
845
- });
846
- const marshalRegistrarApiCreateDomainHostRequest = (request, defaults) => ({
847
- ips: request.ips,
848
- name: request.name
849
- });
850
- const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
851
- ds_record: request.dsRecord
852
- });
853
- const marshalRegistrarApiRegisterExternalDomainRequest = (request, defaults) => ({
854
- domain: request.domain,
855
- project_id: request.projectId ?? defaults.defaultProjectId
856
- });
857
- const marshalRegistrarApiRenewDomainsRequest = (request, defaults) => ({
858
- domains: request.domains,
859
- duration_in_years: request.durationInYears,
860
- force_late_renewal: request.forceLateRenewal
861
- });
862
- const marshalRegistrarApiTradeDomainRequest = (request, defaults) => ({
863
- project_id: request.projectId,
864
- ...resolveOneOf([{
865
- param: 'new_owner_contact',
866
- value: request.newOwnerContact
867
- }, {
868
- param: 'new_owner_contact_id',
869
- value: request.newOwnerContactId
870
- }])
871
- });
872
- const marshalRegistrarApiTransferInDomainRequest = (request, defaults) => ({
873
- domains: request.domains,
874
- project_id: request.projectId ?? defaults.defaultProjectId,
875
- ...resolveOneOf([{
876
- param: 'owner_contact',
877
- value: request.ownerContact
878
- }, {
879
- param: 'owner_contact_id',
880
- value: request.ownerContactId
881
- }]),
882
- ...resolveOneOf([{
883
- param: 'administrative_contact',
884
- value: request.administrativeContact
885
- }, {
886
- param: 'administrative_contact_id',
887
- value: request.administrativeContactId
888
- }]),
889
- ...resolveOneOf([{
890
- param: 'technical_contact',
891
- value: request.technicalContact
892
- }, {
893
- param: 'technical_contact_id',
894
- value: request.technicalContactId
895
- }])
896
- });
897
- const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
898
- address_line_1: request.addressLine1,
899
- address_line_2: request.addressLine2,
900
- city: request.city,
901
- company_identification_code: request.companyIdentificationCode,
902
- country: request.country,
903
- email: request.email,
904
- email_alt: request.emailAlt,
905
- extension_eu: request.extensionEu,
906
- extension_fr: request.extensionFr,
907
- extension_nl: request.extensionNl,
908
- fax_number: request.faxNumber,
909
- lang: request.lang,
910
- phone_number: request.phoneNumber,
911
- questions: request.questions,
912
- resale: request.resale,
913
- state: request.state,
914
- vat_identification_code: request.vatIdentificationCode,
915
- whois_opt_in: request.whoisOptIn,
916
- zip: request.zip
917
- });
918
- const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({
919
- ips: request.ips
920
- });
921
- const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({
922
- ...resolveOneOf([{
923
- param: 'technical_contact',
924
- value: request.technicalContact
925
- }, {
926
- param: 'technical_contact_id',
927
- value: request.technicalContactId
928
- }]),
929
- ...resolveOneOf([{
930
- param: 'owner_contact',
931
- value: request.ownerContact
932
- }, {
933
- param: 'owner_contact_id',
934
- value: request.ownerContactId
935
- }]),
936
- ...resolveOneOf([{
937
- param: 'administrative_contact',
938
- value: request.administrativeContact
939
- }, {
940
- param: 'administrative_contact_id',
941
- value: request.administrativeContactId
942
- }])
943
- });
944
- const marshalUpdateDNSZoneNameserversRequest = (request, defaults) => ({
945
- ns: request.ns
946
- });
947
- const marshalUpdateDNSZoneRecordsRequest = (request, defaults) => ({
948
- changes: request.changes,
949
- disallow_new_zone_creation: request.disallowNewZoneCreation,
950
- return_all_records: request.returnAllRecords,
951
- serial: request.serial
952
- });
953
- const marshalUpdateDNSZoneRequest = (request, defaults) => ({
954
- new_dns_zone: request.newDnsZone,
955
- project_id: request.projectId ?? defaults.defaultProjectId
956
- });
957
-
958
- export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiCreateDomainHostRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainHostRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalHost, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainHostsResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalListTldsResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };