@scaleway/sdk 1.14.0 → 1.16.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 (54) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
  3. package/dist/api/baremetal/v1/api.gen.js +434 -378
  4. package/dist/api/baremetal/v1/api.utils.js +19 -22
  5. package/dist/api/billing/v2alpha1/api.gen.js +21 -17
  6. package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
  7. package/dist/api/container/v1beta1/api.gen.js +384 -337
  8. package/dist/api/domain/v2beta1/api.gen.js +754 -668
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
  10. package/dist/api/function/v1beta1/api.gen.js +467 -407
  11. package/dist/api/iam/v1alpha1/api.gen.js +641 -557
  12. package/dist/api/instance/v1/api.gen.js +803 -677
  13. package/dist/api/instance/v1/api.utils.js +337 -325
  14. package/dist/api/instance/v1/content.gen.js +4 -1
  15. package/dist/api/instance/v1/index.js +1 -1
  16. package/dist/api/instance/v1/marshalling.gen.js +27 -4
  17. package/dist/api/iot/v1/api.gen.js +508 -452
  18. package/dist/api/ipfs/index.js +2 -0
  19. package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
  20. package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
  21. package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
  22. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
  23. package/dist/api/k8s/v1/api.gen.js +403 -342
  24. package/dist/api/k8s/v1/api.utils.js +7 -10
  25. package/dist/api/k8s/v1/marshalling.gen.js +19 -1
  26. package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
  27. package/dist/api/lb/v1/api.gen.js +1501 -1363
  28. package/dist/api/lb/v1/api.utils.js +71 -75
  29. package/dist/api/lb/v1/marshalling.gen.js +6 -0
  30. package/dist/api/marketplace/v1/api.gen.js +35 -32
  31. package/dist/api/marketplace/v2/api.gen.js +117 -102
  32. package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
  33. package/dist/api/rdb/v1/api.gen.js +897 -819
  34. package/dist/api/redis/v1/api.gen.js +358 -333
  35. package/dist/api/redis/v1/marshalling.gen.js +1 -0
  36. package/dist/api/registry/v1/api.gen.js +211 -189
  37. package/dist/api/secret/v1alpha1/api.gen.js +295 -246
  38. package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
  39. package/dist/api/tem/v1alpha1/api.gen.js +182 -147
  40. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  41. package/dist/api/test/v1/api.gen.js +116 -104
  42. package/dist/api/vpc/v1/api.gen.js +74 -65
  43. package/dist/api/vpc/v2/api.gen.js +200 -178
  44. package/dist/api/vpc/v2/marshalling.gen.js +1 -0
  45. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  46. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  47. package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
  48. package/dist/index.cjs +924 -453
  49. package/dist/index.d.ts +2152 -1558
  50. package/dist/index.js +28 -26
  51. package/dist/internal/logger/console-logger.js +4 -5
  52. package/dist/scw/constants.js +1 -1
  53. package/dist/scw/errors/scw-error.js +2 -2
  54. package/package.json +2 -2
@@ -26,27 +26,25 @@ const jsonContentHeaders = {
26
26
  * SCW_SECRET_KEY env variable.
27
27
  */
28
28
  class API extends API$1 {
29
- constructor() {
30
- var _this;
31
- super(...arguments);
32
- _this = this;
33
- /**
34
- * Register a user. Register a human and return a access-key and a secret-key
35
- * that must be used in all other commands.
36
- *
37
- * Hint: you can use other test commands by setting the SCW_SECRET_KEY env
38
- * variable.
39
- *
40
- * @param request - The request {@link RegisterRequest}
41
- * @returns A Promise of RegisterResponse
42
- */
43
- this.register = request => this.client.fetch({
44
- body: JSON.stringify(marshalRegisterRequest(request, this.client.settings)),
45
- headers: jsonContentHeaders,
46
- method: 'POST',
47
- path: `/test/v1/register`
48
- }, unmarshalRegisterResponse);
49
- this.pageOfListHumans = function (request) {
29
+ /**
30
+ * Register a user. Register a human and return a access-key and a secret-key
31
+ * that must be used in all other commands.
32
+ *
33
+ * Hint: you can use other test commands by setting the SCW_SECRET_KEY env
34
+ * variable.
35
+ *
36
+ * @param request - The request {@link RegisterRequest}
37
+ * @returns A Promise of RegisterResponse
38
+ */
39
+ register = request => this.client.fetch({
40
+ body: JSON.stringify(marshalRegisterRequest(request, this.client.settings)),
41
+ headers: jsonContentHeaders,
42
+ method: 'POST',
43
+ path: `/test/v1/register`
44
+ }, unmarshalRegisterResponse);
45
+ pageOfListHumans = (() => {
46
+ var _this = this;
47
+ return function (request) {
50
48
  if (request === void 0) {
51
49
  request = {};
52
50
  }
@@ -56,102 +54,116 @@ class API extends API$1 {
56
54
  urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
57
55
  }, unmarshalListHumansResponse);
58
56
  };
59
- /**
60
- * List all your humans.
61
- *
62
- * @param request - The request {@link ListHumansRequest}
63
- * @returns A Promise of ListHumansResponse
64
- */
65
- this.listHumans = function (request) {
57
+ })();
58
+
59
+ /**
60
+ * List all your humans.
61
+ *
62
+ * @param request - The request {@link ListHumansRequest}
63
+ * @returns A Promise of ListHumansResponse
64
+ */
65
+ listHumans = (() => {
66
+ var _this2 = this;
67
+ return function (request) {
66
68
  if (request === void 0) {
67
69
  request = {};
68
70
  }
69
- return enrichForPagination('humans', _this.pageOfListHumans, request);
71
+ return enrichForPagination('humans', _this2.pageOfListHumans, request);
70
72
  };
71
- /**
72
- * Get human details. Get the human details associated with the given id.
73
- *
74
- * @param request - The request {@link GetHumanRequest}
75
- * @returns A Promise of Human
76
- */
77
- this.getHuman = request => this.client.fetch({
78
- method: 'GET',
79
- path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
80
- }, unmarshalHuman);
81
- /**
82
- * Waits for {@link Human} to be in a final state.
83
- *
84
- * @param request - The request {@link GetHumanRequest}
85
- * @param options - The waiting options
86
- * @returns A Promise of Human
87
- */
88
- this.waitForHuman = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUMAN_TRANSIENT_STATUSES.includes(res.status))), this.getHuman, request, options);
89
- /**
90
- * Create a new human.
91
- *
92
- * @param request - The request {@link CreateHumanRequest}
93
- * @returns A Promise of Human
94
- */
95
- this.createHuman = request => this.client.fetch({
96
- body: JSON.stringify(marshalCreateHumanRequest(request, this.client.settings)),
97
- headers: jsonContentHeaders,
98
- method: 'POST',
99
- path: `/test/v1/humans`
100
- }, unmarshalHuman);
101
- /**
102
- * Update an existing human. Update the human associated with the given id.
103
- *
104
- * @param request - The request {@link UpdateHumanRequest}
105
- * @returns A Promise of Human
106
- */
107
- this.updateHuman = request => this.client.fetch({
108
- body: JSON.stringify(marshalUpdateHumanRequest(request, this.client.settings)),
109
- headers: jsonContentHeaders,
110
- method: 'PATCH',
111
- path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
112
- }, unmarshalHuman);
113
- /**
114
- * Delete an existing human. Delete the human associated with the given id.
115
- *
116
- * @param request - The request {@link DeleteHumanRequest}
117
- * @returns A Promise of Human
118
- */
119
- this.deleteHuman = request => this.client.fetch({
120
- method: 'DELETE',
121
- path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
122
- }, unmarshalHuman);
123
- /**
124
- * Start a 1h running for the given human. Start a one hour running for the
125
- * given human.
126
- *
127
- * @param request - The request {@link RunHumanRequest}
128
- * @returns A Promise of Human
129
- */
130
- this.runHuman = request => this.client.fetch({
131
- body: '{}',
132
- headers: jsonContentHeaders,
133
- method: 'POST',
134
- path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}/run`
135
- }, unmarshalHuman);
136
- /**
137
- * Make a human smoke.
138
- *
139
- * @deprecated
140
- * @param request - The request {@link SmokeHumanRequest}
141
- * @returns A Promise of Human
142
- */
143
- this.smokeHuman = function (request) {
73
+ })();
74
+
75
+ /**
76
+ * Get human details. Get the human details associated with the given id.
77
+ *
78
+ * @param request - The request {@link GetHumanRequest}
79
+ * @returns A Promise of Human
80
+ */
81
+ getHuman = request => this.client.fetch({
82
+ method: 'GET',
83
+ path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
84
+ }, unmarshalHuman);
85
+
86
+ /**
87
+ * Waits for {@link Human} to be in a final state.
88
+ *
89
+ * @param request - The request {@link GetHumanRequest}
90
+ * @param options - The waiting options
91
+ * @returns A Promise of Human
92
+ */
93
+ waitForHuman = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUMAN_TRANSIENT_STATUSES.includes(res.status))), this.getHuman, request, options);
94
+
95
+ /**
96
+ * Create a new human.
97
+ *
98
+ * @param request - The request {@link CreateHumanRequest}
99
+ * @returns A Promise of Human
100
+ */
101
+ createHuman = request => this.client.fetch({
102
+ body: JSON.stringify(marshalCreateHumanRequest(request, this.client.settings)),
103
+ headers: jsonContentHeaders,
104
+ method: 'POST',
105
+ path: `/test/v1/humans`
106
+ }, unmarshalHuman);
107
+
108
+ /**
109
+ * Update an existing human. Update the human associated with the given id.
110
+ *
111
+ * @param request - The request {@link UpdateHumanRequest}
112
+ * @returns A Promise of Human
113
+ */
114
+ updateHuman = request => this.client.fetch({
115
+ body: JSON.stringify(marshalUpdateHumanRequest(request, this.client.settings)),
116
+ headers: jsonContentHeaders,
117
+ method: 'PATCH',
118
+ path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
119
+ }, unmarshalHuman);
120
+
121
+ /**
122
+ * Delete an existing human. Delete the human associated with the given id.
123
+ *
124
+ * @param request - The request {@link DeleteHumanRequest}
125
+ * @returns A Promise of Human
126
+ */
127
+ deleteHuman = request => this.client.fetch({
128
+ method: 'DELETE',
129
+ path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}`
130
+ }, unmarshalHuman);
131
+
132
+ /**
133
+ * Start a 1h running for the given human. Start a one hour running for the
134
+ * given human.
135
+ *
136
+ * @param request - The request {@link RunHumanRequest}
137
+ * @returns A Promise of Human
138
+ */
139
+ runHuman = request => this.client.fetch({
140
+ body: '{}',
141
+ headers: jsonContentHeaders,
142
+ method: 'POST',
143
+ path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}/run`
144
+ }, unmarshalHuman);
145
+
146
+ /**
147
+ * Make a human smoke.
148
+ *
149
+ * @deprecated
150
+ * @param request - The request {@link SmokeHumanRequest}
151
+ * @returns A Promise of Human
152
+ */
153
+ smokeHuman = (() => {
154
+ var _this3 = this;
155
+ return function (request) {
144
156
  if (request === void 0) {
145
157
  request = {};
146
158
  }
147
- return _this.client.fetch({
159
+ return _this3.client.fetch({
148
160
  body: '{}',
149
161
  headers: jsonContentHeaders,
150
162
  method: 'POST',
151
163
  path: `/test/v1/humans/${validatePathParam('humanId', request.humanId)}/smoke`
152
164
  }, unmarshalHuman);
153
165
  };
154
- }
166
+ })();
155
167
  }
156
168
 
157
169
  export { API };
@@ -11,11 +11,11 @@ const jsonContentHeaders = {
11
11
 
12
12
  /** VPC API. */
13
13
  class API extends API$1 {
14
- constructor() {
15
- var _this;
16
- super(...arguments);
17
- _this = this;
18
- this.pageOfListPrivateNetworks = function (request) {
14
+ /** Lists the available zones of the API. */
15
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
16
+ pageOfListPrivateNetworks = (() => {
17
+ var _this = this;
18
+ return function (request) {
19
19
  if (request === void 0) {
20
20
  request = {};
21
21
  }
@@ -25,77 +25,86 @@ class API extends API$1 {
25
25
  urlParams: urlParams(['include_regional', request.includeRegional], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['private_network_ids', request.privateNetworkIds], ['project_id', request.projectId], ['tags', request.tags])
26
26
  }, unmarshalListPrivateNetworksResponse);
27
27
  };
28
- /**
29
- * List Private Networks. List existing Private Networks in a specified
30
- * Availability Zone. By default, the Private Networks returned in the list
31
- * are ordered by creation date in ascending order, though this can be
32
- * modified via the order_by field.
33
- *
34
- * @param request - The request {@link ListPrivateNetworksRequest}
35
- * @returns A Promise of ListPrivateNetworksResponse
36
- */
37
- this.listPrivateNetworks = function (request) {
28
+ })();
29
+
30
+ /**
31
+ * List Private Networks. List existing Private Networks in a specified
32
+ * Availability Zone. By default, the Private Networks returned in the list
33
+ * are ordered by creation date in ascending order, though this can be
34
+ * modified via the order_by field.
35
+ *
36
+ * @param request - The request {@link ListPrivateNetworksRequest}
37
+ * @returns A Promise of ListPrivateNetworksResponse
38
+ */
39
+ listPrivateNetworks = (() => {
40
+ var _this2 = this;
41
+ return function (request) {
38
42
  if (request === void 0) {
39
43
  request = {};
40
44
  }
41
- return enrichForPagination('privateNetworks', _this.pageOfListPrivateNetworks, request);
45
+ return enrichForPagination('privateNetworks', _this2.pageOfListPrivateNetworks, request);
42
46
  };
43
- /**
44
- * Create a Private Network. Create a new Private Network. Once created, you
45
- * can attach Scaleway resources in the same Availability Zone.
46
- *
47
- * @param request - The request {@link CreatePrivateNetworkRequest}
48
- * @returns A Promise of PrivateNetwork
49
- */
50
- this.createPrivateNetwork = function (request) {
47
+ })();
48
+
49
+ /**
50
+ * Create a Private Network. Create a new Private Network. Once created, you
51
+ * can attach Scaleway resources in the same Availability Zone.
52
+ *
53
+ * @param request - The request {@link CreatePrivateNetworkRequest}
54
+ * @returns A Promise of PrivateNetwork
55
+ */
56
+ createPrivateNetwork = (() => {
57
+ var _this3 = this;
58
+ return function (request) {
51
59
  if (request === void 0) {
52
60
  request = {};
53
61
  }
54
- return _this.client.fetch({
55
- body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this.client.settings)),
62
+ return _this3.client.fetch({
63
+ body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, _this3.client.settings)),
56
64
  headers: jsonContentHeaders,
57
65
  method: 'POST',
58
- path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/private-networks`
66
+ path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/private-networks`
59
67
  }, unmarshalPrivateNetwork);
60
68
  };
61
- /**
62
- * Get a Private Network. Retrieve information about an existing Private
63
- * Network, specified by its Private Network ID. Its full details are returned
64
- * in the response object.
65
- *
66
- * @param request - The request {@link GetPrivateNetworkRequest}
67
- * @returns A Promise of PrivateNetwork
68
- */
69
- this.getPrivateNetwork = request => this.client.fetch({
70
- method: 'GET',
71
- path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
72
- }, unmarshalPrivateNetwork);
73
- /**
74
- * Update Private Network. Update parameters (such as name or tags) of an
75
- * existing Private Network, specified by its Private Network ID.
76
- *
77
- * @param request - The request {@link UpdatePrivateNetworkRequest}
78
- * @returns A Promise of PrivateNetwork
79
- */
80
- this.updatePrivateNetwork = request => this.client.fetch({
81
- body: JSON.stringify(marshalUpdatePrivateNetworkRequest(request, this.client.settings)),
82
- headers: jsonContentHeaders,
83
- method: 'PATCH',
84
- path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
85
- }, unmarshalPrivateNetwork);
86
- /**
87
- * Delete a Private Network. Delete an existing Private Network. Note that you
88
- * must first detach all resources from the network, in order to delete it.
89
- *
90
- * @param request - The request {@link DeletePrivateNetworkRequest}
91
- */
92
- this.deletePrivateNetwork = request => this.client.fetch({
93
- method: 'DELETE',
94
- path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
95
- });
96
- }
69
+ })();
70
+
71
+ /**
72
+ * Get a Private Network. Retrieve information about an existing Private
73
+ * Network, specified by its Private Network ID. Its full details are returned
74
+ * in the response object.
75
+ *
76
+ * @param request - The request {@link GetPrivateNetworkRequest}
77
+ * @returns A Promise of PrivateNetwork
78
+ */
79
+ getPrivateNetwork = request => this.client.fetch({
80
+ method: 'GET',
81
+ path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
82
+ }, unmarshalPrivateNetwork);
83
+
84
+ /**
85
+ * Update Private Network. Update parameters (such as name or tags) of an
86
+ * existing Private Network, specified by its Private Network ID.
87
+ *
88
+ * @param request - The request {@link UpdatePrivateNetworkRequest}
89
+ * @returns A Promise of PrivateNetwork
90
+ */
91
+ updatePrivateNetwork = request => this.client.fetch({
92
+ body: JSON.stringify(marshalUpdatePrivateNetworkRequest(request, this.client.settings)),
93
+ headers: jsonContentHeaders,
94
+ method: 'PATCH',
95
+ path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
96
+ }, unmarshalPrivateNetwork);
97
+
98
+ /**
99
+ * Delete a Private Network. Delete an existing Private Network. Note that you
100
+ * must first detach all resources from the network, in order to delete it.
101
+ *
102
+ * @param request - The request {@link DeletePrivateNetworkRequest}
103
+ */
104
+ deletePrivateNetwork = request => this.client.fetch({
105
+ method: 'DELETE',
106
+ path: `/vpc/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`
107
+ });
97
108
  }
98
- /** Lists the available zones of the API. */
99
- API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
100
109
 
101
110
  export { API };