@scaleway/sdk 0.1.0-beta.8 → 1.0.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 (173) hide show
  1. package/README.md +1 -1
  2. package/dist/api/account/index.js +2 -2
  3. package/dist/api/account/v2/api.gen.js +5 -18
  4. package/dist/api/account/v2/index.gen.js +3 -0
  5. package/dist/api/account/v2/marshalling.gen.js +0 -2
  6. package/dist/api/account/v2alpha1/api.gen.js +3 -13
  7. package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
  8. package/dist/api/applesilicon/index.js +2 -2
  9. package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
  10. package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
  11. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
  12. package/dist/api/baremetal/v1/api.gen.js +47 -49
  13. package/dist/api/baremetal/v1/api.utils.js +2 -10
  14. package/dist/api/baremetal/v1/content.gen.js +6 -3
  15. package/dist/api/baremetal/v1/index.js +4 -1
  16. package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
  17. package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
  18. package/dist/api/container/index.js +2 -2
  19. package/dist/api/container/v1beta1/api.gen.js +5 -51
  20. package/dist/api/container/v1beta1/content.gen.js +4 -4
  21. package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
  22. package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
  23. package/dist/api/domain/index.js +2 -2
  24. package/dist/api/domain/v2beta1/api.gen.js +55 -85
  25. package/dist/api/domain/v2beta1/content.gen.js +22 -1
  26. package/dist/api/domain/v2beta1/index.gen.js +4 -0
  27. package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
  28. package/dist/api/flexibleip/index.js +2 -2
  29. package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
  30. package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
  31. package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
  32. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
  33. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
  34. package/dist/api/function/index.js +2 -2
  35. package/dist/api/function/v1beta1/api.gen.js +54 -57
  36. package/dist/api/function/v1beta1/content.gen.js +8 -5
  37. package/dist/api/function/v1beta1/index.gen.js +4 -0
  38. package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
  39. package/dist/api/iam/index.js +2 -2
  40. package/dist/api/iam/v1alpha1/api.gen.js +15 -62
  41. package/dist/api/iam/v1alpha1/index.gen.js +5 -0
  42. package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
  43. package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
  44. package/dist/api/instance/v1/api.gen.js +38 -118
  45. package/dist/api/instance/v1/api.utils.js +59 -51
  46. package/dist/api/instance/v1/content.gen.js +7 -7
  47. package/dist/api/instance/v1/marshalling.gen.js +46 -168
  48. package/dist/api/instance/v1/marshalling.utils.js +63 -0
  49. package/dist/api/iot/index.js +2 -2
  50. package/dist/api/iot/v1/api.gen.js +5 -56
  51. package/dist/api/iot/v1/index.gen.js +4 -0
  52. package/dist/api/iot/v1/marshalling.gen.js +2 -51
  53. package/dist/api/k8s/index.js +2 -2
  54. package/dist/api/k8s/v1/api.gen.js +17 -43
  55. package/dist/api/k8s/v1/content.gen.js +2 -2
  56. package/dist/api/k8s/v1/index.gen.js +6 -0
  57. package/dist/api/k8s/v1/marshalling.gen.js +18 -36
  58. package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
  59. package/dist/api/lb/v1/api.gen.js +8 -163
  60. package/dist/api/lb/v1/api.utils.js +3 -9
  61. package/dist/api/lb/v1/content.gen.js +3 -3
  62. package/dist/api/lb/v1/marshalling.gen.js +74 -101
  63. package/dist/api/marketplace/index.js +4 -2
  64. package/dist/api/marketplace/v1/api.gen.js +3 -13
  65. package/dist/api/marketplace/v1/index.gen.js +3 -0
  66. package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
  67. package/dist/api/marketplace/v2/api.gen.js +85 -0
  68. package/dist/api/marketplace/v2/index.gen.js +3 -0
  69. package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
  70. package/dist/api/mnq/index.js +2 -2
  71. package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
  72. package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
  73. package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
  74. package/dist/api/rdb/index.js +2 -2
  75. package/dist/api/rdb/v1/api.gen.js +15 -89
  76. package/dist/api/rdb/v1/content.gen.js +10 -4
  77. package/dist/api/rdb/v1/index.gen.js +4 -0
  78. package/dist/api/rdb/v1/marshalling.gen.js +25 -81
  79. package/dist/api/redis/index.js +2 -2
  80. package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
  81. package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
  82. package/dist/api/redis/v1/index.gen.js +4 -0
  83. package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
  84. package/dist/api/registry/index.js +2 -2
  85. package/dist/api/registry/v1/api.gen.js +5 -29
  86. package/dist/api/registry/v1/content.gen.js +2 -2
  87. package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
  88. package/dist/api/registry/v1/marshalling.gen.js +2 -8
  89. package/dist/api/secret/index.js +2 -0
  90. package/dist/api/secret/v1alpha1/api.gen.js +135 -0
  91. package/dist/api/secret/v1alpha1/index.gen.js +3 -0
  92. package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
  93. package/dist/api/tem/index.js +2 -0
  94. package/dist/api/tem/v1alpha1/api.gen.js +109 -0
  95. package/dist/api/tem/v1alpha1/content.gen.js +10 -0
  96. package/dist/api/tem/v1alpha1/index.gen.js +4 -0
  97. package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
  98. package/dist/api/test/index.js +2 -2
  99. package/dist/api/test/v1/api.gen.js +6 -20
  100. package/dist/api/test/v1/index.gen.js +4 -0
  101. package/dist/api/test/v1/marshalling.gen.js +2 -5
  102. package/dist/api/vpc/index.js +2 -2
  103. package/dist/api/vpc/v1/api.gen.js +6 -17
  104. package/dist/api/vpc/v1/index.gen.js +3 -0
  105. package/dist/api/vpc/v1/marshalling.gen.js +1 -3
  106. package/dist/api/vpcgw/index.js +2 -2
  107. package/dist/api/vpcgw/v1/api.gen.js +5 -64
  108. package/dist/api/vpcgw/v1/content.gen.js +2 -2
  109. package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
  110. package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
  111. package/dist/helpers/json.js +1 -2
  112. package/dist/helpers/marshalling.js +7 -20
  113. package/dist/index.cjs +3870 -2948
  114. package/dist/index.d.ts +7218 -4335
  115. package/dist/index.js +10 -6
  116. package/dist/internal/async/interval-retrier.js +10 -16
  117. package/dist/internal/interceptors/interceptor.js +3 -1
  118. package/dist/internal/interceptors/request.js +1 -3
  119. package/dist/internal/logger/console-logger.js +3 -5
  120. package/dist/internal/logger/index.js +3 -5
  121. package/dist/internal/logger/level-resolver.js +0 -3
  122. package/dist/internal/validations/string-validation.js +8 -10
  123. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
  124. package/dist/scw/api.js +3 -4
  125. package/dist/scw/auth.js +3 -5
  126. package/dist/scw/client-ini-factory.js +32 -15
  127. package/dist/scw/client-ini-profile.js +10 -4
  128. package/dist/scw/client-settings.js +32 -15
  129. package/dist/scw/client.js +5 -6
  130. package/dist/scw/constants.js +1 -1
  131. package/dist/scw/custom-marshalling.js +8 -14
  132. package/dist/scw/errors/error-parser.js +2 -21
  133. package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
  134. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
  135. package/dist/scw/errors/scw-error.js +20 -20
  136. package/dist/scw/errors/standard/already-exists-error.js +3 -4
  137. package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
  138. package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
  139. package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
  140. package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
  141. package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
  142. package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
  143. package/dist/scw/errors/standard/resource-expired-error.js +3 -4
  144. package/dist/scw/errors/standard/resource-locked-error.js +3 -4
  145. package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
  146. package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
  147. package/dist/scw/errors/standard/transient-state-error.js +3 -4
  148. package/dist/scw/errors/types.js +0 -3
  149. package/dist/scw/fetch/build-fetcher.js +1 -9
  150. package/dist/scw/fetch/http-dumper.js +4 -7
  151. package/dist/scw/fetch/http-interceptors.js +9 -12
  152. package/dist/scw/fetch/resource-paginator.js +18 -16
  153. package/dist/scw/fetch/response-parser.js +17 -23
  154. package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
  155. package/node_modules/@scaleway/random-name/dist/index.js +5 -246
  156. package/node_modules/@scaleway/random-name/package.json +6 -5
  157. package/package.json +4 -5
  158. package/dist/api/account/v2/index.js +0 -1
  159. package/dist/api/applesilicon/v1alpha1/index.js +0 -2
  160. package/dist/api/domain/v2beta1/index.js +0 -2
  161. package/dist/api/flexibleip/v1alpha1/index.js +0 -2
  162. package/dist/api/function/v1beta1/index.js +0 -2
  163. package/dist/api/iam/v1alpha1/index.js +0 -1
  164. package/dist/api/iot/v1/index.js +0 -2
  165. package/dist/api/k8s/v1/index.js +0 -2
  166. package/dist/api/marketplace/v1/index.js +0 -1
  167. package/dist/api/mnq/v1alpha1/index.js +0 -1
  168. package/dist/api/rdb/v1/index.js +0 -2
  169. package/dist/api/redis/v1alpha1/index.js +0 -2
  170. package/dist/api/test/v1/index.js +0 -1
  171. package/dist/api/vpc/v1/index.js +0 -1
  172. package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
  173. package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
@@ -3,119 +3,97 @@ import { unmarshalMoney } from '../../../scw/custom-marshalling.js';
3
3
  import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf, unmarshalMapOfObject } from '../../../helpers/marshalling.js';
4
4
 
5
5
  // This file was automatically generated. DO NOT EDIT.
6
-
7
6
  const unmarshalDomainRecordGeoIPConfigMatch = data => {
8
7
  if (!isJSONObject(data)) {
9
8
  throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
10
9
  }
11
-
12
10
  return {
13
11
  continents: data.continents,
14
12
  countries: data.countries,
15
13
  data: data.data
16
14
  };
17
15
  };
18
-
19
16
  const unmarshalDomainRecordViewConfigView = data => {
20
17
  if (!isJSONObject(data)) {
21
18
  throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfigView' failed as data isn't a dictionary.`);
22
19
  }
23
-
24
20
  return {
25
21
  data: data.data,
26
22
  subnet: data.subnet
27
23
  };
28
24
  };
29
-
30
25
  const unmarshalDomainRecordWeightedConfigWeightedIP = data => {
31
26
  if (!isJSONObject(data)) {
32
27
  throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`);
33
28
  }
34
-
35
29
  return {
36
30
  ip: data.ip,
37
31
  weight: data.weight
38
32
  };
39
33
  };
40
-
41
34
  const unmarshalContactExtensionFRAssociationInfo = data => {
42
35
  if (!isJSONObject(data)) {
43
36
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
44
37
  }
45
-
46
38
  return {
47
39
  publicationJo: unmarshalDate(data.publication_jo),
48
40
  publicationJoPage: data.publication_jo_page
49
41
  };
50
42
  };
51
-
52
43
  const unmarshalContactExtensionFRCodeAuthAfnicInfo = data => {
53
44
  if (!isJSONObject(data)) {
54
45
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFRCodeAuthAfnicInfo' failed as data isn't a dictionary.`);
55
46
  }
56
-
57
47
  return {
58
48
  codeAuthAfnic: data.code_auth_afnic
59
49
  };
60
50
  };
61
-
62
51
  const unmarshalContactExtensionFRDunsInfo = data => {
63
52
  if (!isJSONObject(data)) {
64
53
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFRDunsInfo' failed as data isn't a dictionary.`);
65
54
  }
66
-
67
55
  return {
68
56
  dunsId: data.duns_id,
69
57
  localId: data.local_id
70
58
  };
71
59
  };
72
-
73
60
  const unmarshalContactExtensionFRIndividualInfo = data => {
74
61
  if (!isJSONObject(data)) {
75
62
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFRIndividualInfo' failed as data isn't a dictionary.`);
76
63
  }
77
-
78
64
  return {
79
65
  whoisOptIn: data.whois_opt_in
80
66
  };
81
67
  };
82
-
83
68
  const unmarshalContactExtensionFRTrademarkInfo = data => {
84
69
  if (!isJSONObject(data)) {
85
70
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
86
71
  }
87
-
88
72
  return {
89
73
  trademarkInpi: data.trademark_inpi
90
74
  };
91
75
  };
92
-
93
76
  const unmarshalDSRecordPublicKey = data => {
94
77
  if (!isJSONObject(data)) {
95
78
  throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
96
79
  }
97
-
98
80
  return {
99
81
  key: data.key
100
82
  };
101
83
  };
102
-
103
84
  const unmarshalDomainRecordGeoIPConfig = data => {
104
85
  if (!isJSONObject(data)) {
105
86
  throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
106
87
  }
107
-
108
88
  return {
109
89
  default: data.default,
110
90
  matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
111
91
  };
112
92
  };
113
-
114
93
  const unmarshalDomainRecordHTTPServiceConfig = data => {
115
94
  if (!isJSONObject(data)) {
116
95
  throw new TypeError(`Unmarshalling the type 'DomainRecordHTTPServiceConfig' failed as data isn't a dictionary.`);
117
96
  }
118
-
119
97
  return {
120
98
  ips: data.ips,
121
99
  mustContain: data.must_contain,
@@ -124,42 +102,34 @@ const unmarshalDomainRecordHTTPServiceConfig = data => {
124
102
  userAgent: data.user_agent
125
103
  };
126
104
  };
127
-
128
105
  const unmarshalDomainRecordViewConfig = data => {
129
106
  if (!isJSONObject(data)) {
130
107
  throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
131
108
  }
132
-
133
109
  return {
134
110
  views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
135
111
  };
136
112
  };
137
-
138
113
  const unmarshalDomainRecordWeightedConfig = data => {
139
114
  if (!isJSONObject(data)) {
140
115
  throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
141
116
  }
142
-
143
117
  return {
144
118
  weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
145
119
  };
146
120
  };
147
-
148
121
  const unmarshalContactExtensionEU = data => {
149
122
  if (!isJSONObject(data)) {
150
123
  throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
151
124
  }
152
-
153
125
  return {
154
126
  europeanCitizenship: data.european_citizenship
155
127
  };
156
128
  };
157
-
158
129
  const unmarshalContactExtensionFR = data => {
159
130
  if (!isJSONObject(data)) {
160
131
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFR' failed as data isn't a dictionary.`);
161
132
  }
162
-
163
133
  return {
164
134
  associationInfo: data.association_info ? unmarshalContactExtensionFRAssociationInfo(data.association_info) : undefined,
165
135
  codeAuthAfnicInfo: data.code_auth_afnic_info ? unmarshalContactExtensionFRCodeAuthAfnicInfo(data.code_auth_afnic_info) : undefined,
@@ -169,46 +139,38 @@ const unmarshalContactExtensionFR = data => {
169
139
  trademarkInfo: data.trademark_info ? unmarshalContactExtensionFRTrademarkInfo(data.trademark_info) : undefined
170
140
  };
171
141
  };
172
-
173
142
  const unmarshalContactExtensionNL = data => {
174
143
  if (!isJSONObject(data)) {
175
144
  throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
176
145
  }
177
-
178
146
  return {
179
147
  legalForm: data.legal_form,
180
148
  legalFormRegistrationNumber: data.legal_form_registration_number
181
149
  };
182
150
  };
183
-
184
151
  const unmarshalContactQuestion = data => {
185
152
  if (!isJSONObject(data)) {
186
153
  throw new TypeError(`Unmarshalling the type 'ContactQuestion' failed as data isn't a dictionary.`);
187
154
  }
188
-
189
155
  return {
190
156
  answer: data.answer,
191
157
  question: data.question
192
158
  };
193
159
  };
194
-
195
160
  const unmarshalDSRecordDigest = data => {
196
161
  if (!isJSONObject(data)) {
197
162
  throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
198
163
  }
199
-
200
164
  return {
201
165
  digest: data.digest,
202
166
  publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined,
203
167
  type: data.type
204
168
  };
205
169
  };
206
-
207
170
  const unmarshalDomainRecord = data => {
208
171
  if (!isJSONObject(data)) {
209
172
  throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
210
173
  }
211
-
212
174
  return {
213
175
  comment: data.comment,
214
176
  data: data.data,
@@ -223,12 +185,10 @@ const unmarshalDomainRecord = data => {
223
185
  weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : undefined
224
186
  };
225
187
  };
226
-
227
188
  const unmarshalRecordIdentifier = data => {
228
189
  if (!isJSONObject(data)) {
229
190
  throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
230
191
  }
231
-
232
192
  return {
233
193
  data: data.data,
234
194
  name: data.name,
@@ -236,24 +196,20 @@ const unmarshalRecordIdentifier = data => {
236
196
  type: data.type
237
197
  };
238
198
  };
239
-
240
199
  const unmarshalTldOffer = data => {
241
200
  if (!isJSONObject(data)) {
242
201
  throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
243
202
  }
244
-
245
203
  return {
246
204
  action: data.action,
247
205
  operationPath: data.operation_path,
248
206
  price: data.price ? unmarshalMoney(data.price) : undefined
249
207
  };
250
208
  };
251
-
252
209
  const unmarshalContact = data => {
253
210
  if (!isJSONObject(data)) {
254
211
  throw new TypeError(`Unmarshalling the type 'Contact' failed as data isn't a dictionary.`);
255
212
  }
256
-
257
213
  return {
258
214
  addressLine1: data.address_line_1,
259
215
  addressLine2: data.address_line_2,
@@ -282,24 +238,20 @@ const unmarshalContact = data => {
282
238
  zip: data.zip
283
239
  };
284
240
  };
285
-
286
241
  const unmarshalContactRolesRoles = data => {
287
242
  if (!isJSONObject(data)) {
288
243
  throw new TypeError(`Unmarshalling the type 'ContactRolesRoles' failed as data isn't a dictionary.`);
289
244
  }
290
-
291
245
  return {
292
246
  isAdministrative: data.is_administrative,
293
247
  isOwner: data.is_owner,
294
248
  isTechnical: data.is_technical
295
249
  };
296
250
  };
297
-
298
251
  const unmarshalDSRecord = data => {
299
252
  if (!isJSONObject(data)) {
300
253
  throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
301
254
  }
302
-
303
255
  return {
304
256
  algorithm: data.algorithm,
305
257
  digest: data.digest ? unmarshalDSRecordDigest(data.digest) : undefined,
@@ -307,75 +259,61 @@ const unmarshalDSRecord = data => {
307
259
  publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined
308
260
  };
309
261
  };
310
-
311
262
  const unmarshalDomainRegistrationStatusExternalDomain = data => {
312
263
  if (!isJSONObject(data)) {
313
264
  throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
314
265
  }
315
-
316
266
  return {
317
267
  validationToken: data.validation_token
318
268
  };
319
269
  };
320
-
321
270
  const unmarshalDomainRegistrationStatusTransfer = data => {
322
271
  if (!isJSONObject(data)) {
323
272
  throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
324
273
  }
325
-
326
274
  return {
327
275
  status: data.status,
328
276
  voteCurrentOwner: data.vote_current_owner,
329
277
  voteNewOwner: data.vote_new_owner
330
278
  };
331
279
  };
332
-
333
280
  const unmarshalRecordChangeAdd = data => {
334
281
  if (!isJSONObject(data)) {
335
282
  throw new TypeError(`Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`);
336
283
  }
337
-
338
284
  return {
339
285
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
340
286
  };
341
287
  };
342
-
343
288
  const unmarshalRecordChangeClear = data => {
344
289
  if (!isJSONObject(data)) {
345
290
  throw new TypeError(`Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`);
346
291
  }
347
-
348
292
  return {};
349
293
  };
350
-
351
294
  const unmarshalRecordChangeDelete = data => {
352
295
  if (!isJSONObject(data)) {
353
296
  throw new TypeError(`Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`);
354
297
  }
355
-
356
298
  return {
357
299
  id: data.id,
358
300
  idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined
359
301
  };
360
302
  };
361
-
362
303
  const unmarshalRecordChangeSet = data => {
363
304
  if (!isJSONObject(data)) {
364
305
  throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
365
306
  }
366
-
367
307
  return {
368
308
  id: data.id,
369
309
  idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined,
370
310
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
371
311
  };
372
312
  };
373
-
374
313
  const unmarshalTld = data => {
375
314
  if (!isJSONObject(data)) {
376
315
  throw new TypeError(`Unmarshalling the type 'Tld' failed as data isn't a dictionary.`);
377
316
  }
378
-
379
317
  return {
380
318
  dnssecSupport: data.dnssec_support,
381
319
  durationInYearsMax: data.duration_in_years_max,
@@ -386,46 +324,38 @@ const unmarshalTld = data => {
386
324
  specifications: data.specifications
387
325
  };
388
326
  };
389
-
390
327
  const unmarshalAvailableDomain = data => {
391
328
  if (!isJSONObject(data)) {
392
329
  throw new TypeError(`Unmarshalling the type 'AvailableDomain' failed as data isn't a dictionary.`);
393
330
  }
394
-
395
331
  return {
396
332
  available: data.available,
397
333
  domain: data.domain,
398
334
  tld: data.tld ? unmarshalTld(data.tld) : undefined
399
335
  };
400
336
  };
401
-
402
337
  const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
403
338
  if (!isJSONObject(data)) {
404
339
  throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
405
340
  }
406
-
407
341
  return {
408
342
  compatible: data.compatible,
409
343
  errorMessage: data.error_message
410
344
  };
411
345
  };
412
-
413
346
  const unmarshalContactRoles = data => {
414
347
  if (!isJSONObject(data)) {
415
348
  throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
416
349
  }
417
-
418
350
  return {
419
351
  contact: data.contact ? unmarshalContact(data.contact) : undefined,
420
352
  roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
421
353
  };
422
354
  };
423
-
424
355
  const unmarshalDNSZone = data => {
425
356
  if (!isJSONObject(data)) {
426
357
  throw new TypeError(`Unmarshalling the type 'DNSZone' failed as data isn't a dictionary.`);
427
358
  }
428
-
429
359
  return {
430
360
  domain: data.domain,
431
361
  message: data.message,
@@ -438,34 +368,28 @@ const unmarshalDNSZone = data => {
438
368
  updatedAt: unmarshalDate(data.updated_at)
439
369
  };
440
370
  };
441
-
442
371
  const unmarshalDNSZoneVersion = data => {
443
372
  if (!isJSONObject(data)) {
444
373
  throw new TypeError(`Unmarshalling the type 'DNSZoneVersion' failed as data isn't a dictionary.`);
445
374
  }
446
-
447
375
  return {
448
376
  createdAt: unmarshalDate(data.created_at),
449
377
  id: data.id
450
378
  };
451
379
  };
452
-
453
380
  const unmarshalDomainDNSSEC = data => {
454
381
  if (!isJSONObject(data)) {
455
382
  throw new TypeError(`Unmarshalling the type 'DomainDNSSEC' failed as data isn't a dictionary.`);
456
383
  }
457
-
458
384
  return {
459
385
  dsRecords: unmarshalArrayOfObject(data.ds_records, unmarshalDSRecord),
460
386
  status: data.status
461
387
  };
462
388
  };
463
-
464
389
  const unmarshalDomainSummary = data => {
465
390
  if (!isJSONObject(data)) {
466
391
  throw new TypeError(`Unmarshalling the type 'DomainSummary' failed as data isn't a dictionary.`);
467
392
  }
468
-
469
393
  return {
470
394
  autoRenewStatus: data.auto_renew_status,
471
395
  dnssecStatus: data.dnssec_status,
@@ -482,23 +406,30 @@ const unmarshalDomainSummary = data => {
482
406
  updatedAt: unmarshalDate(data.updated_at)
483
407
  };
484
408
  };
485
-
409
+ const unmarshalHost = data => {
410
+ if (!isJSONObject(data)) {
411
+ throw new TypeError(`Unmarshalling the type 'Host' failed as data isn't a dictionary.`);
412
+ }
413
+ return {
414
+ domain: data.domain,
415
+ ips: data.ips,
416
+ name: data.name,
417
+ status: data.status
418
+ };
419
+ };
486
420
  const unmarshalNameserver = data => {
487
421
  if (!isJSONObject(data)) {
488
422
  throw new TypeError(`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`);
489
423
  }
490
-
491
424
  return {
492
425
  ip: data.ip,
493
426
  name: data.name
494
427
  };
495
428
  };
496
-
497
429
  const unmarshalRecordChange = data => {
498
430
  if (!isJSONObject(data)) {
499
431
  throw new TypeError(`Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`);
500
432
  }
501
-
502
433
  return {
503
434
  add: data.add ? unmarshalRecordChangeAdd(data.add) : undefined,
504
435
  clear: data.clear ? unmarshalRecordChangeClear(data.clear) : undefined,
@@ -506,27 +437,27 @@ const unmarshalRecordChange = data => {
506
437
  set: data.set ? unmarshalRecordChangeSet(data.set) : undefined
507
438
  };
508
439
  };
509
-
510
440
  const unmarshalRenewableDomain = data => {
511
441
  if (!isJSONObject(data)) {
512
442
  throw new TypeError(`Unmarshalling the type 'RenewableDomain' failed as data isn't a dictionary.`);
513
443
  }
514
-
515
444
  return {
516
445
  domain: data.domain,
446
+ estimatedDeleteAt: unmarshalDate(data.estimated_delete_at),
517
447
  expiredAt: unmarshalDate(data.expired_at),
448
+ limitRedemptionAt: unmarshalDate(data.limit_redemption_at),
449
+ limitRenewAt: unmarshalDate(data.limit_renew_at),
518
450
  organizationId: data.organization_id,
519
451
  projectId: data.project_id,
520
452
  renewableDurationInYears: data.renewable_duration_in_years,
521
- status: data.status
453
+ status: data.status,
454
+ tld: data.tld ? unmarshalTld(data.tld) : undefined
522
455
  };
523
456
  };
524
-
525
457
  const unmarshalSSLCertificate = data => {
526
458
  if (!isJSONObject(data)) {
527
459
  throw new TypeError(`Unmarshalling the type 'SSLCertificate' failed as data isn't a dictionary.`);
528
460
  }
529
-
530
461
  return {
531
462
  alternativeDnsZones: data.alternative_dns_zones,
532
463
  certificateChain: data.certificate_chain,
@@ -537,12 +468,10 @@ const unmarshalSSLCertificate = data => {
537
468
  status: data.status
538
469
  };
539
470
  };
540
-
541
471
  const unmarshalTask = data => {
542
472
  if (!isJSONObject(data)) {
543
473
  throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
544
474
  }
545
-
546
475
  return {
547
476
  domain: data.domain,
548
477
  id: data.id,
@@ -555,12 +484,10 @@ const unmarshalTask = data => {
555
484
  updatedAt: unmarshalDate(data.updated_at)
556
485
  };
557
486
  };
558
-
559
487
  const unmarshalCheckContactsCompatibilityResponse = data => {
560
488
  if (!isJSONObject(data)) {
561
489
  throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
562
490
  }
563
-
564
491
  return {
565
492
  administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : undefined,
566
493
  compatible: data.compatible,
@@ -572,35 +499,30 @@ const unmarshalClearDNSZoneRecordsResponse = data => {
572
499
  if (!isJSONObject(data)) {
573
500
  throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
574
501
  }
575
-
576
502
  return {};
577
503
  };
578
504
  const unmarshalDeleteDNSZoneResponse = data => {
579
505
  if (!isJSONObject(data)) {
580
506
  throw new TypeError(`Unmarshalling the type 'DeleteDNSZoneResponse' failed as data isn't a dictionary.`);
581
507
  }
582
-
583
508
  return {};
584
509
  };
585
510
  const unmarshalDeleteExternalDomainResponse = data => {
586
511
  if (!isJSONObject(data)) {
587
512
  throw new TypeError(`Unmarshalling the type 'DeleteExternalDomainResponse' failed as data isn't a dictionary.`);
588
513
  }
589
-
590
514
  return {};
591
515
  };
592
516
  const unmarshalDeleteSSLCertificateResponse = data => {
593
517
  if (!isJSONObject(data)) {
594
518
  throw new TypeError(`Unmarshalling the type 'DeleteSSLCertificateResponse' failed as data isn't a dictionary.`);
595
519
  }
596
-
597
520
  return {};
598
521
  };
599
522
  const unmarshalDomain = data => {
600
523
  if (!isJSONObject(data)) {
601
524
  throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
602
525
  }
603
-
604
526
  return {
605
527
  administrativeContact: data.administrative_contact ? unmarshalContact(data.administrative_contact) : undefined,
606
528
  autoRenewStatus: data.auto_renew_status,
@@ -617,6 +539,7 @@ const unmarshalDomain = data => {
617
539
  registrar: data.registrar,
618
540
  status: data.status,
619
541
  technicalContact: data.technical_contact ? unmarshalContact(data.technical_contact) : undefined,
542
+ tld: data.tld ? unmarshalTld(data.tld) : undefined,
620
543
  transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
621
544
  updatedAt: unmarshalDate(data.updated_at)
622
545
  };
@@ -625,7 +548,6 @@ const unmarshalGetDNSZoneTsigKeyResponse = data => {
625
548
  if (!isJSONObject(data)) {
626
549
  throw new TypeError(`Unmarshalling the type 'GetDNSZoneTsigKeyResponse' failed as data isn't a dictionary.`);
627
550
  }
628
-
629
551
  return {
630
552
  algorithm: data.algorithm,
631
553
  key: data.key,
@@ -636,7 +558,6 @@ const unmarshalGetDNSZoneVersionDiffResponse = data => {
636
558
  if (!isJSONObject(data)) {
637
559
  throw new TypeError(`Unmarshalling the type 'GetDNSZoneVersionDiffResponse' failed as data isn't a dictionary.`);
638
560
  }
639
-
640
561
  return {
641
562
  changes: unmarshalArrayOfObject(data.changes, unmarshalRecordChange)
642
563
  };
@@ -645,7 +566,6 @@ const unmarshalGetDomainAuthCodeResponse = data => {
645
566
  if (!isJSONObject(data)) {
646
567
  throw new TypeError(`Unmarshalling the type 'GetDomainAuthCodeResponse' failed as data isn't a dictionary.`);
647
568
  }
648
-
649
569
  return {
650
570
  authCode: data.auth_code
651
571
  };
@@ -654,7 +574,6 @@ const unmarshalImportProviderDNSZoneResponse = data => {
654
574
  if (!isJSONObject(data)) {
655
575
  throw new TypeError(`Unmarshalling the type 'ImportProviderDNSZoneResponse' failed as data isn't a dictionary.`);
656
576
  }
657
-
658
577
  return {
659
578
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
660
579
  };
@@ -663,7 +582,6 @@ const unmarshalImportRawDNSZoneResponse = data => {
663
582
  if (!isJSONObject(data)) {
664
583
  throw new TypeError(`Unmarshalling the type 'ImportRawDNSZoneResponse' failed as data isn't a dictionary.`);
665
584
  }
666
-
667
585
  return {
668
586
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
669
587
  };
@@ -672,7 +590,6 @@ const unmarshalListContactsResponse = data => {
672
590
  if (!isJSONObject(data)) {
673
591
  throw new TypeError(`Unmarshalling the type 'ListContactsResponse' failed as data isn't a dictionary.`);
674
592
  }
675
-
676
593
  return {
677
594
  contacts: unmarshalArrayOfObject(data.contacts, unmarshalContactRoles),
678
595
  totalCount: data.total_count
@@ -682,7 +599,6 @@ const unmarshalListDNSZoneNameserversResponse = data => {
682
599
  if (!isJSONObject(data)) {
683
600
  throw new TypeError(`Unmarshalling the type 'ListDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
684
601
  }
685
-
686
602
  return {
687
603
  ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver)
688
604
  };
@@ -691,7 +607,6 @@ const unmarshalListDNSZoneRecordsResponse = data => {
691
607
  if (!isJSONObject(data)) {
692
608
  throw new TypeError(`Unmarshalling the type 'ListDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
693
609
  }
694
-
695
610
  return {
696
611
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
697
612
  totalCount: data.total_count
@@ -701,7 +616,6 @@ const unmarshalListDNSZoneVersionRecordsResponse = data => {
701
616
  if (!isJSONObject(data)) {
702
617
  throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionRecordsResponse' failed as data isn't a dictionary.`);
703
618
  }
704
-
705
619
  return {
706
620
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
707
621
  totalCount: data.total_count
@@ -711,7 +625,6 @@ const unmarshalListDNSZoneVersionsResponse = data => {
711
625
  if (!isJSONObject(data)) {
712
626
  throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionsResponse' failed as data isn't a dictionary.`);
713
627
  }
714
-
715
628
  return {
716
629
  totalCount: data.total_count,
717
630
  versions: unmarshalArrayOfObject(data.versions, unmarshalDNSZoneVersion)
@@ -721,17 +634,24 @@ const unmarshalListDNSZonesResponse = data => {
721
634
  if (!isJSONObject(data)) {
722
635
  throw new TypeError(`Unmarshalling the type 'ListDNSZonesResponse' failed as data isn't a dictionary.`);
723
636
  }
724
-
725
637
  return {
726
638
  dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
727
639
  totalCount: data.total_count
728
640
  };
729
641
  };
642
+ const unmarshalListDomainHostsResponse = data => {
643
+ if (!isJSONObject(data)) {
644
+ throw new TypeError(`Unmarshalling the type 'ListDomainHostsResponse' failed as data isn't a dictionary.`);
645
+ }
646
+ return {
647
+ hosts: unmarshalArrayOfObject(data.hosts, unmarshalHost),
648
+ totalCount: data.total_count
649
+ };
650
+ };
730
651
  const unmarshalListDomainsResponse = data => {
731
652
  if (!isJSONObject(data)) {
732
653
  throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
733
654
  }
734
-
735
655
  return {
736
656
  domains: unmarshalArrayOfObject(data.domains, unmarshalDomainSummary),
737
657
  totalCount: data.total_count
@@ -741,7 +661,6 @@ const unmarshalListRenewableDomainsResponse = data => {
741
661
  if (!isJSONObject(data)) {
742
662
  throw new TypeError(`Unmarshalling the type 'ListRenewableDomainsResponse' failed as data isn't a dictionary.`);
743
663
  }
744
-
745
664
  return {
746
665
  domains: unmarshalArrayOfObject(data.domains, unmarshalRenewableDomain),
747
666
  totalCount: data.total_count
@@ -751,7 +670,6 @@ const unmarshalListSSLCertificatesResponse = data => {
751
670
  if (!isJSONObject(data)) {
752
671
  throw new TypeError(`Unmarshalling the type 'ListSSLCertificatesResponse' failed as data isn't a dictionary.`);
753
672
  }
754
-
755
673
  return {
756
674
  certificates: unmarshalArrayOfObject(data.certificates, unmarshalSSLCertificate),
757
675
  totalCount: data.total_count
@@ -761,7 +679,6 @@ const unmarshalListTasksResponse = data => {
761
679
  if (!isJSONObject(data)) {
762
680
  throw new TypeError(`Unmarshalling the type 'ListTasksResponse' failed as data isn't a dictionary.`);
763
681
  }
764
-
765
682
  return {
766
683
  tasks: unmarshalArrayOfObject(data.tasks, unmarshalTask),
767
684
  totalCount: data.total_count
@@ -771,7 +688,6 @@ const unmarshalOrderResponse = data => {
771
688
  if (!isJSONObject(data)) {
772
689
  throw new TypeError(`Unmarshalling the type 'OrderResponse' failed as data isn't a dictionary.`);
773
690
  }
774
-
775
691
  return {
776
692
  createdAt: unmarshalDate(data.created_at),
777
693
  domains: data.domains,
@@ -784,7 +700,6 @@ const unmarshalRefreshDNSZoneResponse = data => {
784
700
  if (!isJSONObject(data)) {
785
701
  throw new TypeError(`Unmarshalling the type 'RefreshDNSZoneResponse' failed as data isn't a dictionary.`);
786
702
  }
787
-
788
703
  return {
789
704
  dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone)
790
705
  };
@@ -793,7 +708,6 @@ const unmarshalRegisterExternalDomainResponse = data => {
793
708
  if (!isJSONObject(data)) {
794
709
  throw new TypeError(`Unmarshalling the type 'RegisterExternalDomainResponse' failed as data isn't a dictionary.`);
795
710
  }
796
-
797
711
  return {
798
712
  createdAt: unmarshalDate(data.created_at),
799
713
  domain: data.domain,
@@ -806,14 +720,12 @@ const unmarshalRestoreDNSZoneVersionResponse = data => {
806
720
  if (!isJSONObject(data)) {
807
721
  throw new TypeError(`Unmarshalling the type 'RestoreDNSZoneVersionResponse' failed as data isn't a dictionary.`);
808
722
  }
809
-
810
723
  return {};
811
724
  };
812
725
  const unmarshalSearchAvailableDomainsResponse = data => {
813
726
  if (!isJSONObject(data)) {
814
727
  throw new TypeError(`Unmarshalling the type 'SearchAvailableDomainsResponse' failed as data isn't a dictionary.`);
815
728
  }
816
-
817
729
  return {
818
730
  availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain)
819
731
  };
@@ -822,7 +734,6 @@ const unmarshalUpdateDNSZoneNameserversResponse = data => {
822
734
  if (!isJSONObject(data)) {
823
735
  throw new TypeError(`Unmarshalling the type 'UpdateDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
824
736
  }
825
-
826
737
  return {
827
738
  ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver)
828
739
  };
@@ -831,33 +742,27 @@ const unmarshalUpdateDNSZoneRecordsResponse = data => {
831
742
  if (!isJSONObject(data)) {
832
743
  throw new TypeError(`Unmarshalling the type 'UpdateDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
833
744
  }
834
-
835
745
  return {
836
746
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
837
747
  };
838
748
  };
839
-
840
749
  const marshalDomainRecordGeoIPConfigMatch = (request, defaults) => ({
841
750
  continents: request.continents,
842
751
  countries: request.countries,
843
752
  data: request.data
844
753
  });
845
-
846
754
  const marshalDomainRecordViewConfigView = (request, defaults) => ({
847
755
  data: request.data,
848
756
  subnet: request.subnet
849
757
  });
850
-
851
758
  const marshalDomainRecordWeightedConfigWeightedIP = (request, defaults) => ({
852
759
  ip: request.ip,
853
760
  weight: request.weight
854
761
  });
855
-
856
762
  const marshalDomainRecordGeoIPConfig = (request, defaults) => ({
857
763
  default: request.default,
858
764
  matches: request.matches.map(elt => marshalDomainRecordGeoIPConfigMatch(elt))
859
765
  });
860
-
861
766
  const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
862
767
  ips: request.ips,
863
768
  must_contain: request.mustContain,
@@ -865,41 +770,32 @@ const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
865
770
  url: request.url,
866
771
  user_agent: request.userAgent
867
772
  });
868
-
869
773
  const marshalDomainRecordViewConfig = (request, defaults) => ({
870
774
  views: request.views.map(elt => marshalDomainRecordViewConfigView(elt))
871
775
  });
872
-
873
776
  const marshalDomainRecordWeightedConfig = (request, defaults) => ({
874
777
  weighted_ips: request.weightedIps.map(elt => marshalDomainRecordWeightedConfigWeightedIP(elt))
875
778
  });
876
-
877
779
  const marshalContactExtensionFRAssociationInfo = (request, defaults) => ({
878
780
  publication_jo: request.publicationJo,
879
781
  publication_jo_page: request.publicationJoPage
880
782
  });
881
-
882
783
  const marshalContactExtensionFRCodeAuthAfnicInfo = (request, defaults) => ({
883
784
  code_auth_afnic: request.codeAuthAfnic
884
785
  });
885
-
886
786
  const marshalContactExtensionFRDunsInfo = (request, defaults) => ({
887
787
  duns_id: request.dunsId,
888
788
  local_id: request.localId
889
789
  });
890
-
891
790
  const marshalContactExtensionFRIndividualInfo = (request, defaults) => ({
892
791
  whois_opt_in: request.whoisOptIn
893
792
  });
894
-
895
793
  const marshalContactExtensionFRTrademarkInfo = (request, defaults) => ({
896
794
  trademark_inpi: request.trademarkInpi
897
795
  });
898
-
899
796
  const marshalDSRecordPublicKey = (request, defaults) => ({
900
797
  key: request.key
901
798
  });
902
-
903
799
  const marshalDomainRecord = (request, defaults) => ({
904
800
  comment: request.comment,
905
801
  data: request.data,
@@ -922,18 +818,15 @@ const marshalDomainRecord = (request, defaults) => ({
922
818
  value: request.viewConfig ? marshalDomainRecordViewConfig(request.viewConfig) : undefined
923
819
  }])
924
820
  });
925
-
926
821
  const marshalRecordIdentifier = (request, defaults) => ({
927
822
  data: request.data,
928
823
  name: request.name,
929
824
  ttl: request.ttl,
930
825
  type: request.type
931
826
  });
932
-
933
827
  const marshalContactExtensionEU = (request, defaults) => ({
934
828
  european_citizenship: request.europeanCitizenship
935
829
  });
936
-
937
830
  const marshalContactExtensionFR = (request, defaults) => ({
938
831
  mode: request.mode,
939
832
  ...resolveOneOf([{
@@ -953,36 +846,30 @@ const marshalContactExtensionFR = (request, defaults) => ({
953
846
  value: request.codeAuthAfnicInfo ? marshalContactExtensionFRCodeAuthAfnicInfo(request.codeAuthAfnicInfo) : undefined
954
847
  }])
955
848
  });
956
-
957
849
  const marshalContactExtensionNL = (request, defaults) => ({
958
850
  legal_form: request.legalForm,
959
851
  legal_form_registration_number: request.legalFormRegistrationNumber
960
852
  });
961
-
962
853
  const marshalContactQuestion = (request, defaults) => ({
963
854
  answer: request.answer,
964
855
  question: request.question
965
856
  });
966
-
967
857
  const marshalDSRecordDigest = (request, defaults) => ({
968
858
  digest: request.digest,
969
859
  public_key: request.publicKey ? marshalDSRecordPublicKey(request.publicKey) : undefined,
970
860
  type: request.type
971
861
  });
972
-
973
862
  const marshalImportRawDNSZoneRequestTsigKey = (request, defaults) => ({
974
863
  algorithm: request.algorithm,
975
864
  key: request.key,
976
865
  name: request.name
977
866
  });
978
-
979
867
  const marshalRecordChangeAdd = (request, defaults) => ({
980
868
  records: request.records.map(elt => marshalDomainRecord(elt))
981
869
  });
982
-
983
870
  const marshalRecordChangeClear = (request, defaults) => ({});
984
-
985
- const marshalRecordChangeDelete = (request, defaults) => ({ ...resolveOneOf([{
871
+ const marshalRecordChangeDelete = (request, defaults) => ({
872
+ ...resolveOneOf([{
986
873
  param: 'id',
987
874
  value: request.id
988
875
  }, {
@@ -990,7 +877,6 @@ const marshalRecordChangeDelete = (request, defaults) => ({ ...resolveOneOf([{
990
877
  value: request.idFields ? marshalRecordIdentifier(request.idFields) : undefined
991
878
  }])
992
879
  });
993
-
994
880
  const marshalRecordChangeSet = (request, defaults) => ({
995
881
  records: request.records.map(elt => marshalDomainRecord(elt)),
996
882
  ...resolveOneOf([{
@@ -1001,7 +887,6 @@ const marshalRecordChangeSet = (request, defaults) => ({
1001
887
  value: request.idFields ? marshalRecordIdentifier(request.idFields) : undefined
1002
888
  }])
1003
889
  });
1004
-
1005
890
  const marshalDSRecord = (request, defaults) => ({
1006
891
  algorithm: request.algorithm,
1007
892
  key_id: request.keyId,
@@ -1013,25 +898,20 @@ const marshalDSRecord = (request, defaults) => ({
1013
898
  value: request.publicKey ? marshalDSRecordPublicKey(request.publicKey) : undefined
1014
899
  }])
1015
900
  });
1016
-
1017
901
  const marshalImportProviderDNSZoneRequestOnlineV1 = (request, defaults) => ({
1018
902
  token: request.token
1019
903
  });
1020
-
1021
904
  const marshalImportRawDNSZoneRequestAXFRSource = (request, defaults) => ({
1022
905
  name_server: request.nameServer,
1023
906
  tsig_key: request.tsigKey ? marshalImportRawDNSZoneRequestTsigKey(request.tsigKey) : undefined
1024
907
  });
1025
-
1026
908
  const marshalImportRawDNSZoneRequestBindSource = (request, defaults) => ({
1027
909
  content: request.content
1028
910
  });
1029
-
1030
911
  const marshalNameserver = (request, defaults) => ({
1031
912
  ip: request.ip,
1032
913
  name: request.name
1033
914
  });
1034
-
1035
915
  const marshalNewContact = (request, defaults) => ({
1036
916
  address_line_1: request.addressLine1,
1037
917
  address_line_2: request.addressLine2,
@@ -1057,8 +937,8 @@ const marshalNewContact = (request, defaults) => ({
1057
937
  whois_opt_in: request.whoisOptIn,
1058
938
  zip: request.zip
1059
939
  });
1060
-
1061
- const marshalRecordChange = (request, defaults) => ({ ...resolveOneOf([{
940
+ const marshalRecordChange = (request, defaults) => ({
941
+ ...resolveOneOf([{
1062
942
  param: 'add',
1063
943
  value: request.add ? marshalRecordChangeAdd(request.add) : undefined
1064
944
  }, {
@@ -1072,17 +952,14 @@ const marshalRecordChange = (request, defaults) => ({ ...resolveOneOf([{
1072
952
  value: request.clear ? marshalRecordChangeClear(request.clear) : undefined
1073
953
  }])
1074
954
  });
1075
-
1076
955
  const marshalTransferInDomainRequestTransferRequest = (request, defaults) => ({
1077
956
  auth_code: request.authCode,
1078
957
  domain: request.domain
1079
958
  });
1080
-
1081
959
  const marshalUpdateContactRequestQuestion = (request, defaults) => ({
1082
960
  answer: request.answer,
1083
961
  question: request.question
1084
962
  });
1085
-
1086
963
  const marshalCloneDNSZoneRequest = (request, defaults) => ({
1087
964
  dest_dns_zone: request.destDnsZone,
1088
965
  overwrite: request.overwrite,
@@ -1097,7 +974,8 @@ const marshalCreateSSLCertificateRequest = (request, defaults) => ({
1097
974
  alternative_dns_zones: request.alternativeDnsZones,
1098
975
  dns_zone: request.dnsZone
1099
976
  });
1100
- const marshalImportProviderDNSZoneRequest = (request, defaults) => ({ ...resolveOneOf([{
977
+ const marshalImportProviderDNSZoneRequest = (request, defaults) => ({
978
+ ...resolveOneOf([{
1101
979
  param: 'online_v1',
1102
980
  value: request.onlineV1 ? marshalImportProviderDNSZoneRequestOnlineV1(request.onlineV1) : undefined
1103
981
  }])
@@ -1144,7 +1022,10 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
1144
1022
  value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1145
1023
  }])
1146
1024
  });
1147
- const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({ ...resolveOneOf([{
1025
+ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({
1026
+ domains: request.domains,
1027
+ tlds: request.tlds,
1028
+ ...resolveOneOf([{
1148
1029
  param: 'administrative_contact_id',
1149
1030
  value: request.administrativeContactId
1150
1031
  }, {
@@ -1158,13 +1039,6 @@ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults)
1158
1039
  param: 'owner_contact',
1159
1040
  value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
1160
1041
  }]),
1161
- ...resolveOneOf([{
1162
- param: 'domain',
1163
- value: request.domain
1164
- }, {
1165
- param: 'tld',
1166
- value: request.tld
1167
- }]),
1168
1042
  ...resolveOneOf([{
1169
1043
  param: 'technical_contact_id',
1170
1044
  value: request.technicalContactId
@@ -1173,6 +1047,10 @@ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults)
1173
1047
  value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1174
1048
  }])
1175
1049
  });
1050
+ const marshalRegistrarApiCreateDomainHostRequest = (request, defaults) => ({
1051
+ ips: request.ips,
1052
+ name: request.name
1053
+ });
1176
1054
  const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
1177
1055
  ds_record: request.dsRecord ? marshalDSRecord(request.dsRecord) : undefined
1178
1056
  });
@@ -1232,7 +1110,7 @@ const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
1232
1110
  extension_fr: request.extensionFr ? marshalContactExtensionFR(request.extensionFr) : undefined,
1233
1111
  extension_nl: request.extensionNl ? marshalContactExtensionNL(request.extensionNl) : undefined,
1234
1112
  fax_number: request.faxNumber,
1235
- lang: request.lang,
1113
+ lang: request.lang ?? 'unknown_language_code',
1236
1114
  phone_number: request.phoneNumber,
1237
1115
  questions: request.questions ? request.questions.map(elt => marshalUpdateContactRequestQuestion(elt)) : undefined,
1238
1116
  resale: request.resale,
@@ -1241,7 +1119,11 @@ const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
1241
1119
  whois_opt_in: request.whoisOptIn,
1242
1120
  zip: request.zip
1243
1121
  });
1244
- const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({ ...resolveOneOf([{
1122
+ const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({
1123
+ ips: request.ips
1124
+ });
1125
+ const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({
1126
+ ...resolveOneOf([{
1245
1127
  param: 'administrative_contact_id',
1246
1128
  value: request.administrativeContactId
1247
1129
  }, {
@@ -1277,4 +1159,4 @@ const marshalUpdateDNSZoneRequest = (request, defaults) => ({
1277
1159
  project_id: request.projectId ?? defaults.defaultProjectId
1278
1160
  });
1279
1161
 
1280
- export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };
1162
+ 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, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };