@scaleway/sdk 1.38.0 → 1.39.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.
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from './marshalling.gen.js';
4
+ import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse, unmarshalListDiscountsResponse } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -75,6 +75,37 @@ class API extends API$1 {
75
75
  urlParams: urlParams(['dl', 1], ['file_type', request.fileType ?? 'pdf']),
76
76
  responseType: 'blob'
77
77
  });
78
+ pageOfListDiscounts = (() => {
79
+ var _this4 = this;
80
+ return function (request) {
81
+ if (request === void 0) {
82
+ request = {};
83
+ }
84
+ return _this4.client.fetch({
85
+ method: 'GET',
86
+ path: `/billing/v2alpha1/discounts`,
87
+ urlParams: urlParams(['order_by', request.orderBy ?? 'creation_date_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
88
+ }, unmarshalListDiscountsResponse);
89
+ };
90
+ })();
91
+
92
+ /**
93
+ * List all user's discounts. List all discounts for an organization and
94
+ * usable categories/products/offers/references/regions/zones where the
95
+ * discount can be applied.
96
+ *
97
+ * @param request - The request {@link ListDiscountsRequest}
98
+ * @returns A Promise of ListDiscountsResponse
99
+ */
100
+ listDiscounts = (() => {
101
+ var _this5 = this;
102
+ return function (request) {
103
+ if (request === void 0) {
104
+ request = {};
105
+ }
106
+ return enrichForPagination('discounts', _this5.pageOfListDiscounts, request);
107
+ };
108
+ })();
78
109
  }
79
110
 
80
111
  export { API };
@@ -4,6 +4,42 @@ import { unmarshalArrayOfObject, unmarshalDate } from '../../../helpers/marshall
4
4
 
5
5
  // This file was automatically generated. DO NOT EDIT.
6
6
  // If you have any remark or suggestion do not hesitate to open an issue.
7
+ const unmarshalDiscountCoupon = data => {
8
+ if (!isJSONObject(data)) {
9
+ throw new TypeError(`Unmarshalling the type 'DiscountCoupon' failed as data isn't a dictionary.`);
10
+ }
11
+ return {
12
+ description: data.description
13
+ };
14
+ };
15
+ const unmarshalDiscountFilter = data => {
16
+ if (!isJSONObject(data)) {
17
+ throw new TypeError(`Unmarshalling the type 'DiscountFilter' failed as data isn't a dictionary.`);
18
+ }
19
+ return {
20
+ type: data.type,
21
+ value: data.value
22
+ };
23
+ };
24
+ const unmarshalDiscount = data => {
25
+ if (!isJSONObject(data)) {
26
+ throw new TypeError(`Unmarshalling the type 'Discount' failed as data isn't a dictionary.`);
27
+ }
28
+ return {
29
+ coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : undefined,
30
+ creationDate: unmarshalDate(data.creation_date),
31
+ description: data.description,
32
+ filters: unmarshalArrayOfObject(data.filters, unmarshalDiscountFilter),
33
+ id: data.id,
34
+ mode: data.mode,
35
+ organizationId: data.organization_id,
36
+ startDate: unmarshalDate(data.start_date),
37
+ stopDate: unmarshalDate(data.stop_date),
38
+ value: data.value,
39
+ valueRemaining: data.value_remaining,
40
+ valueUsed: data.value_used
41
+ };
42
+ };
7
43
  const unmarshalGetConsumptionResponseConsumption = data => {
8
44
  if (!isJSONObject(data)) {
9
45
  throw new TypeError(`Unmarshalling the type 'GetConsumptionResponseConsumption' failed as data isn't a dictionary.`);
@@ -40,6 +76,15 @@ const unmarshalGetConsumptionResponse = data => {
40
76
  updatedAt: unmarshalDate(data.updated_at)
41
77
  };
42
78
  };
79
+ const unmarshalListDiscountsResponse = data => {
80
+ if (!isJSONObject(data)) {
81
+ throw new TypeError(`Unmarshalling the type 'ListDiscountsResponse' failed as data isn't a dictionary.`);
82
+ }
83
+ return {
84
+ discounts: unmarshalArrayOfObject(data.discounts, unmarshalDiscount),
85
+ totalCount: data.total_count
86
+ };
87
+ };
43
88
  const unmarshalListInvoicesResponse = data => {
44
89
  if (!isJSONObject(data)) {
45
90
  throw new TypeError(`Unmarshalling the type 'ListInvoicesResponse' failed as data isn't a dictionary.`);
@@ -50,4 +95,4 @@ const unmarshalListInvoicesResponse = data => {
50
95
  };
51
96
  };
52
97
 
53
- export { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse };
98
+ export { unmarshalGetConsumptionResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse };
@@ -95,7 +95,9 @@ const unmarshalPlan = data => {
95
95
  retentionLogsInterval: data.retention_logs_interval,
96
96
  retentionMetricsInterval: data.retention_metrics_interval,
97
97
  retentionPrice: data.retention_price,
98
- sampleIngestionPrice: data.sample_ingestion_price
98
+ retentionTracesInterval: data.retention_traces_interval,
99
+ sampleIngestionPrice: data.sample_ingestion_price,
100
+ tracesIngestionPrice: data.traces_ingestion_price
99
101
  };
100
102
  };
101
103
  const unmarshalToken = data => {
@@ -494,12 +494,26 @@ class API extends API$1 {
494
494
  method: 'DELETE',
495
495
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
496
496
  }, unmarshalToken);
497
+
498
+ /**
499
+ * Create a trigger. Create a new trigger for a specified function.
500
+ *
501
+ * @param request - The request {@link CreateTriggerRequest}
502
+ * @returns A Promise of Trigger
503
+ */
497
504
  createTrigger = request => this.client.fetch({
498
505
  body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
499
506
  headers: jsonContentHeaders,
500
507
  method: 'POST',
501
508
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
502
509
  }, unmarshalTrigger);
510
+
511
+ /**
512
+ * Get a trigger. Get a trigger with a specified ID.
513
+ *
514
+ * @param request - The request {@link GetTriggerRequest}
515
+ * @returns A Promise of Trigger
516
+ */
503
517
  getTrigger = request => this.client.fetch({
504
518
  method: 'GET',
505
519
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
@@ -536,6 +550,14 @@ class API extends API$1 {
536
550
  }, unmarshalListTriggersResponse);
537
551
  };
538
552
  })();
553
+
554
+ /**
555
+ * List all triggers. List all triggers belonging to a specified Organization
556
+ * or Project.
557
+ *
558
+ * @param request - The request {@link ListTriggersRequest}
559
+ * @returns A Promise of ListTriggersResponse
560
+ */
539
561
  listTriggers = (() => {
540
562
  var _this10 = this;
541
563
  return function (request) {
@@ -545,12 +567,26 @@ class API extends API$1 {
545
567
  return enrichForPagination('triggers', _this10.pageOfListTriggers, request);
546
568
  };
547
569
  })();
570
+
571
+ /**
572
+ * Update a trigger. Update a trigger with a specified ID.
573
+ *
574
+ * @param request - The request {@link UpdateTriggerRequest}
575
+ * @returns A Promise of Trigger
576
+ */
548
577
  updateTrigger = request => this.client.fetch({
549
578
  body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
550
579
  headers: jsonContentHeaders,
551
580
  method: 'PATCH',
552
581
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
553
582
  }, unmarshalTrigger);
583
+
584
+ /**
585
+ * Delete a trigger. Delete a trigger with a specified ID.
586
+ *
587
+ * @param request - The request {@link DeleteTriggerRequest}
588
+ * @returns A Promise of Trigger
589
+ */
554
590
  deleteTrigger = request => this.client.fetch({
555
591
  method: 'DELETE',
556
592
  path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
@@ -1,7 +1,7 @@
1
1
  import { API as API$1 } from '../../../scw/api.js';
2
2
  import { urlParams, validatePathParam, resolveOneOf } from '../../../helpers/marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
- import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT } from './marshalling.gen.js';
4
+ import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT, unmarshalListLogsResponse, unmarshalLog } from './marshalling.gen.js';
5
5
 
6
6
  // This file was automatically generated. DO NOT EDIT.
7
7
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -762,6 +762,32 @@ class API extends API$1 {
762
762
  method: 'DELETE',
763
763
  path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
764
764
  });
765
+ pageOfListLogs = (() => {
766
+ var _this17 = this;
767
+ return function (request) {
768
+ if (request === void 0) {
769
+ request = {};
770
+ }
771
+ return _this17.client.fetch({
772
+ method: 'GET',
773
+ path: `/iam/v1alpha1/logs`,
774
+ urlParams: urlParams(['action', request.action ?? 'unknown_action'], ['created_after', request.createdAfter], ['created_before', request.createdBefore], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this17.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this17.client.settings.defaultPageSize], ['resource_type', request.resourceType ?? 'unknown_resource_type'], ['search', request.search])
775
+ }, unmarshalListLogsResponse);
776
+ };
777
+ })();
778
+ listLogs = (() => {
779
+ var _this18 = this;
780
+ return function (request) {
781
+ if (request === void 0) {
782
+ request = {};
783
+ }
784
+ return enrichForPagination('logs', _this18.pageOfListLogs, request);
785
+ };
786
+ })();
787
+ getLog = request => this.client.fetch({
788
+ method: 'GET',
789
+ path: `/iam/v1alpha1/logs/${validatePathParam('logId', request.logId)}`
790
+ }, unmarshalLog);
765
791
  }
766
792
 
767
793
  export { API };
@@ -67,6 +67,22 @@ const unmarshalJWT = data => {
67
67
  userAgent: data.user_agent
68
68
  };
69
69
  };
70
+ const unmarshalLog = data => {
71
+ if (!isJSONObject(data)) {
72
+ throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
73
+ }
74
+ return {
75
+ action: data.action,
76
+ bearerId: data.bearer_id,
77
+ createdAt: unmarshalDate(data.created_at),
78
+ id: data.id,
79
+ ip: data.ip,
80
+ organizationId: data.organization_id,
81
+ resourceId: data.resource_id,
82
+ resourceType: data.resource_type,
83
+ userAgent: data.user_agent
84
+ };
85
+ };
70
86
  const unmarshalPermissionSet = data => {
71
87
  if (!isJSONObject(data)) {
72
88
  throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
@@ -194,6 +210,15 @@ const unmarshalListJWTsResponse = data => {
194
210
  totalCount: data.total_count
195
211
  };
196
212
  };
213
+ const unmarshalListLogsResponse = data => {
214
+ if (!isJSONObject(data)) {
215
+ throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
216
+ }
217
+ return {
218
+ logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
219
+ totalCount: data.total_count
220
+ };
221
+ };
197
222
  const unmarshalListPermissionSetsResponse = data => {
198
223
  if (!isJSONObject(data)) {
199
224
  throw new TypeError(`Unmarshalling the type 'ListPermissionSetsResponse' failed as data isn't a dictionary.`);
@@ -380,4 +405,4 @@ const marshalUpdateSSHKeyRequest = (request, defaults) => ({
380
405
  name: request.name
381
406
  });
382
407
 
383
- export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
408
+ export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
@@ -102,6 +102,15 @@ const ListJWTsRequest = {
102
102
  lessThanOrEqual: 100
103
103
  }
104
104
  };
105
+ const ListLogsRequest = {
106
+ page: {
107
+ greaterThan: 0
108
+ },
109
+ pageSize: {
110
+ greaterThanOrEqual: 1,
111
+ lessThanOrEqual: 100
112
+ }
113
+ };
105
114
  const ListPermissionSetsRequest = {
106
115
  page: {
107
116
  greaterThan: 0
@@ -204,4 +213,4 @@ const UpdateSSHKeyRequest = {
204
213
  }
205
214
  };
206
215
 
207
- export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
216
+ export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListLogsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
@@ -13,6 +13,9 @@ const PRIVATE_NIC_TRANSIENT_STATUSES = ['syncing'];
13
13
  /** Lists transient statutes of the enum {@link SecurityGroupState}. */
14
14
  const SECURITY_GROUP_TRANSIENT_STATUSES = ['syncing'];
15
15
 
16
+ /** Lists transient statutes of the enum {@link ServerIpState}. */
17
+ const SERVER_IP_TRANSIENT_STATUSES = ['pending'];
18
+
16
19
  /** Lists transient statutes of the enum {@link ServerState}. */
17
20
  const SERVER_TRANSIENT_STATUSES = ['starting', 'stopping'];
18
21
 
@@ -28,4 +31,4 @@ const VOLUME_SERVER_TRANSIENT_STATUSES = ['snapshotting', 'fetching', 'resizing'
28
31
  /** Lists transient statutes of the enum {@link VolumeState}. */
29
32
  const VOLUME_TRANSIENT_STATUSES = ['snapshotting', 'fetching', 'resizing', 'saving', 'hotsyncing'];
30
33
 
31
- export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
34
+ export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
@@ -1,2 +1,2 @@
1
1
  export { InstanceV1UtilsAPI as API } from './api.utils.js';
2
- export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from './content.gen.js';
2
+ export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from './content.gen.js';
@@ -153,6 +153,7 @@ const unmarshalServerIp = data => {
153
153
  id: data.id,
154
154
  netmask: data.netmask,
155
155
  provisioningMode: data.provisioning_mode,
156
+ state: data.state,
156
157
  tags: data.tags
157
158
  };
158
159
  };
@@ -996,6 +997,7 @@ const marshalServerIp = (request, defaults) => ({
996
997
  id: request.id,
997
998
  netmask: request.netmask,
998
999
  provisioning_mode: request.provisioningMode,
1000
+ state: request.state,
999
1001
  tags: request.tags
1000
1002
  });
1001
1003
  const marshalServerIpv6 = (request, defaults) => ({
@@ -128,20 +128,14 @@ const unmarshalReplacePinResponse = data => {
128
128
  pin: data.pin ? unmarshalPin(data.pin) : undefined
129
129
  };
130
130
  };
131
- const marshalPinOptions = (request, defaults) => ({
132
- replication_count: request.replicationCount,
133
- required_zones: request.requiredZones
134
- });
135
131
  const marshalCreatePinByCIDRequest = (request, defaults) => ({
136
132
  cid: request.cid,
137
133
  name: request.name,
138
134
  origins: request.origins,
139
- pin_options: request.pinOptions ? marshalPinOptions(request.pinOptions) : undefined,
140
135
  volume_id: request.volumeId
141
136
  });
142
137
  const marshalCreatePinByURLRequest = (request, defaults) => ({
143
138
  name: request.name,
144
- pin_options: request.pinOptions ? marshalPinOptions(request.pinOptions) : undefined,
145
139
  url: request.url,
146
140
  volume_id: request.volumeId
147
141
  });
@@ -169,7 +163,6 @@ const marshalReplacePinRequest = (request, defaults) => ({
169
163
  cid: request.cid,
170
164
  name: request.name,
171
165
  origins: request.origins,
172
- pin_options: request.pinOptions ? marshalPinOptions(request.pinOptions) : undefined,
173
166
  volume_id: request.volumeId
174
167
  });
175
168
  const marshalUpdateVolumeRequest = (request, defaults) => ({
@@ -551,6 +551,10 @@ const marshalReadReplicaEndpointSpec = (request, defaults) => ({
551
551
  value: request.privateNetwork ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork) : undefined
552
552
  }])
553
553
  });
554
+ const marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (request, defaults) => ({
555
+ upgradable_version_id: request.upgradableVersionId,
556
+ with_endpoints: request.withEndpoints
557
+ });
554
558
  const marshalAddInstanceACLRulesRequest = (request, defaults) => ({
555
559
  rules: request.rules.map(elt => marshalACLRuleRequest(elt))
556
560
  });
@@ -688,6 +692,9 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
688
692
  }, {
689
693
  param: 'upgradable_version_id',
690
694
  value: request.upgradableVersionId
695
+ }, {
696
+ param: 'major_upgrade_workflow',
697
+ value: request.majorUpgradeWorkflow ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(request.majorUpgradeWorkflow) : undefined
691
698
  }])
692
699
  });
693
700
 
@@ -134,7 +134,13 @@ class API extends API$1 {
134
134
 
135
135
  /**
136
136
  * Get information about a domain. Retrieve information about a specific
137
- * domain using the `region` and `domain_id` parameters.
137
+ * domain using the `region` and `domain_id` parameters. Monitor your domain's
138
+ * reputation and improve **average** and **bad** reputation statuses, using
139
+ * your domain's **Email activity** tab on the [Scaleway
140
+ * console](https://console.scaleway.com/transactional-email/domains) to get a
141
+ * more detailed report. Check out our [dedicated
142
+ * documentation](https://www.scaleway.com/en/docs/managed-services/transactional-email/reference-content/understanding-tem-reputation-score/)
143
+ * to improve your domain's reputation.
138
144
  *
139
145
  * @param request - The request {@link GetDomainRequest}
140
146
  * @returns A Promise of Domain
@@ -167,7 +173,7 @@ class API extends API$1 {
167
173
  })();
168
174
 
169
175
  /**
170
- * List domains. Retrieve domains in a specific project or in a specific
176
+ * List domains. Retrieve domains in a specific Project or in a specific
171
177
  * Organization using the `region` parameter.
172
178
  *
173
179
  * @param request - The request {@link ListDomainsRequest}
@@ -35,6 +35,7 @@ const unmarshalIpamConfig = data => {
35
35
  throw new TypeError(`Unmarshalling the type 'IpamConfig' failed as data isn't a dictionary.`);
36
36
  }
37
37
  return {
38
+ ipamIpId: data.ipam_ip_id,
38
39
  pushDefaultRoute: data.push_default_route
39
40
  };
40
41
  };
@@ -237,7 +238,8 @@ const marshalCreateDHCPRequest = (request, defaults) => ({
237
238
  subnet: request.subnet,
238
239
  valid_lifetime: request.validLifetime
239
240
  });
240
- const marshalIpamConfig = (request, defaults) => ({
241
+ const marshalCreateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
242
+ ipam_ip_id: request.ipamIpId,
241
243
  push_default_route: request.pushDefaultRoute
242
244
  });
243
245
  const marshalSetDHCPEntriesRequestEntry = (request, defaults) => ({
@@ -250,6 +252,10 @@ const marshalSetPATRulesRequestRule = (request, defaults) => ({
250
252
  protocol: request.protocol,
251
253
  public_port: request.publicPort
252
254
  });
255
+ const marshalUpdateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
256
+ ipam_ip_id: request.ipamIpId,
257
+ push_default_route: request.pushDefaultRoute
258
+ });
253
259
  const marshalCreateDHCPEntryRequest = (request, defaults) => ({
254
260
  gateway_network_id: request.gatewayNetworkId,
255
261
  ip_address: request.ipAddress,
@@ -271,7 +277,7 @@ const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
271
277
  value: request.address
272
278
  }, {
273
279
  param: 'ipam_config',
274
- value: request.ipamConfig ? marshalIpamConfig(request.ipamConfig) : undefined
280
+ value: request.ipamConfig ? marshalCreateGatewayNetworkRequestIpamConfig(request.ipamConfig) : undefined
275
281
  }])
276
282
  });
277
283
  const marshalCreateGatewayRequest = (request, defaults) => ({
@@ -333,7 +339,7 @@ const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
333
339
  value: request.address
334
340
  }, {
335
341
  param: 'ipam_config',
336
- value: request.ipamConfig ? marshalIpamConfig(request.ipamConfig) : undefined
342
+ value: request.ipamConfig ? marshalUpdateGatewayNetworkRequestIpamConfig(request.ipamConfig) : undefined
337
343
  }])
338
344
  });
339
345
  const marshalUpdateGatewayRequest = (request, defaults) => ({