@scaleway/sdk 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/account/v2/api.gen.js +29 -0
- package/dist/api/account/v2alpha1/api.gen.js +29 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.js +74 -1
- package/dist/api/baremetal/v1/api.gen.js +202 -2
- package/dist/api/baremetal/v1/api.utils.js +7 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +4 -1
- package/dist/api/cockpit/index.js +2 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +319 -0
- package/dist/api/cockpit/v1beta1/content.gen.js +7 -0
- package/dist/api/cockpit/v1beta1/index.gen.js +4 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +174 -0
- package/dist/api/container/v1beta1/api.gen.js +189 -2
- package/dist/api/domain/v2beta1/api.gen.js +395 -8
- package/dist/api/domain/v2beta1/marshalling.gen.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +68 -1
- package/dist/api/function/v1beta1/api.gen.js +214 -2
- package/dist/api/function/v1beta1/marshalling.gen.js +12 -0
- package/dist/api/iam/v1alpha1/api.gen.js +265 -3
- package/dist/api/iam/v1alpha1/marshalling.gen.js +44 -1
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +24 -1
- package/dist/api/instance/v1/api.gen.js +351 -11
- package/dist/api/instance/v1/api.utils.js +101 -0
- package/dist/api/instance/v1/marshalling.gen.js +12 -5
- package/dist/api/iot/v1/api.gen.js +230 -1
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +189 -1
- package/dist/api/k8s/v1/api.utils.js +16 -0
- package/dist/api/k8s/v1/{index.gen.js → index.js} +1 -3
- package/dist/api/lb/v1/api.gen.js +652 -6
- package/dist/api/lb/v1/api.utils.js +29 -0
- package/dist/api/lb/v1/marshalling.gen.js +14 -0
- package/dist/api/marketplace/v1/api.gen.js +12 -0
- package/dist/api/marketplace/v2/api.gen.js +18 -0
- package/dist/api/mnq/v1alpha1/api.gen.js +60 -1
- package/dist/api/rdb/v1/api.gen.js +383 -4
- package/dist/api/rdb/v1/marshalling.gen.js +5 -1
- package/dist/api/redis/v1/api.gen.js +144 -1
- package/dist/api/registry/v1/api.gen.js +96 -2
- package/dist/api/secret/v1alpha1/api.gen.js +134 -44
- package/dist/api/tem/v1alpha1/api.gen.js +79 -3
- package/dist/api/test/v1/api.gen.js +61 -1
- package/dist/api/vpc/v1/api.gen.js +31 -1
- package/dist/api/vpcgw/v1/api.gen.js +227 -3
- package/dist/api/webhosting/index.js +2 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +131 -0
- package/dist/api/webhosting/v1alpha1/content.gen.js +7 -0
- package/dist/api/webhosting/v1alpha1/index.gen.js +6 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +140 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/index.cjs +1667 -707
- package/dist/index.d.ts +7504 -5544
- package/dist/index.js +42 -38
- package/dist/scw/constants.js +1 -1
- package/dist/scw/fetch/build-fetcher.js +1 -1
- package/package.json +2 -2
|
@@ -963,7 +963,7 @@ const marshalUpdateContactRequestQuestion = (request, defaults) => ({
|
|
|
963
963
|
const marshalCloneDNSZoneRequest = (request, defaults) => ({
|
|
964
964
|
dest_dns_zone: request.destDnsZone,
|
|
965
965
|
overwrite: request.overwrite,
|
|
966
|
-
project_id: request.projectId
|
|
966
|
+
project_id: request.projectId
|
|
967
967
|
});
|
|
968
968
|
const marshalCreateDNSZoneRequest = (request, defaults) => ({
|
|
969
969
|
domain: request.domain,
|
|
@@ -1064,7 +1064,7 @@ const marshalRegistrarApiRenewDomainsRequest = (request, defaults) => ({
|
|
|
1064
1064
|
force_late_renewal: request.forceLateRenewal
|
|
1065
1065
|
});
|
|
1066
1066
|
const marshalRegistrarApiTradeDomainRequest = (request, defaults) => ({
|
|
1067
|
-
project_id: request.projectId
|
|
1067
|
+
project_id: request.projectId,
|
|
1068
1068
|
...resolveOneOf([{
|
|
1069
1069
|
param: 'new_owner_contact_id',
|
|
1070
1070
|
value: request.newOwnerContactId
|
|
@@ -16,16 +16,35 @@ class API extends API$1 {
|
|
|
16
16
|
var _this;
|
|
17
17
|
super(...arguments);
|
|
18
18
|
_this = this;
|
|
19
|
+
/**
|
|
20
|
+
* Create a Flexible IP
|
|
21
|
+
*
|
|
22
|
+
* @param request - The request {@link CreateFlexibleIPRequest}
|
|
23
|
+
* @returns A Promise of FlexibleIP
|
|
24
|
+
*/
|
|
19
25
|
this.createFlexibleIP = request => this.client.fetch({
|
|
20
26
|
body: JSON.stringify(marshalCreateFlexibleIPRequest(request, this.client.settings)),
|
|
21
27
|
headers: jsonContentHeaders,
|
|
22
28
|
method: 'POST',
|
|
23
29
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips`
|
|
24
30
|
}, unmarshalFlexibleIP);
|
|
31
|
+
/**
|
|
32
|
+
* Get a Flexible IP
|
|
33
|
+
*
|
|
34
|
+
* @param request - The request {@link GetFlexibleIPRequest}
|
|
35
|
+
* @returns A Promise of FlexibleIP
|
|
36
|
+
*/
|
|
25
37
|
this.getFlexibleIP = request => this.client.fetch({
|
|
26
38
|
method: 'GET',
|
|
27
39
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
28
40
|
}, unmarshalFlexibleIP);
|
|
41
|
+
/**
|
|
42
|
+
* Waits for {@link FlexibleIP} to be in a final state.
|
|
43
|
+
*
|
|
44
|
+
* @param request - The request {@link GetFlexibleIPRequest}
|
|
45
|
+
* @param options - The waiting options
|
|
46
|
+
* @returns A Promise of FlexibleIP
|
|
47
|
+
*/
|
|
29
48
|
this.waitForFlexibleIP = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!FLEXIBLE_IP_TRANSIENT_STATUSES.includes(res.status))), this.getFlexibleIP, request, options);
|
|
30
49
|
this.pageOfListFlexibleIPs = function (request) {
|
|
31
50
|
if (request === void 0) {
|
|
@@ -34,43 +53,85 @@ class API extends API$1 {
|
|
|
34
53
|
return _this.client.fetch({
|
|
35
54
|
method: 'GET',
|
|
36
55
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/fips`,
|
|
37
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId
|
|
56
|
+
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], ['server_ids', request.serverIds], ['status', request.status], ['tags', request.tags])
|
|
38
57
|
}, unmarshalListFlexibleIPsResponse);
|
|
39
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* List Flexible IPs
|
|
61
|
+
*
|
|
62
|
+
* @param request - The request {@link ListFlexibleIPsRequest}
|
|
63
|
+
* @returns A Promise of ListFlexibleIPsResponse
|
|
64
|
+
*/
|
|
40
65
|
this.listFlexibleIPs = function (request) {
|
|
41
66
|
if (request === void 0) {
|
|
42
67
|
request = {};
|
|
43
68
|
}
|
|
44
69
|
return enrichForPagination('flexibleIps', _this.pageOfListFlexibleIPs, request);
|
|
45
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Update a Flexible IP
|
|
73
|
+
*
|
|
74
|
+
* @param request - The request {@link UpdateFlexibleIPRequest}
|
|
75
|
+
* @returns A Promise of FlexibleIP
|
|
76
|
+
*/
|
|
46
77
|
this.updateFlexibleIP = request => this.client.fetch({
|
|
47
78
|
body: JSON.stringify(marshalUpdateFlexibleIPRequest(request, this.client.settings)),
|
|
48
79
|
headers: jsonContentHeaders,
|
|
49
80
|
method: 'PATCH',
|
|
50
81
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
51
82
|
}, unmarshalFlexibleIP);
|
|
83
|
+
/**
|
|
84
|
+
* Delete a Flexible IP
|
|
85
|
+
*
|
|
86
|
+
* @param request - The request {@link DeleteFlexibleIPRequest}
|
|
87
|
+
*/
|
|
52
88
|
this.deleteFlexibleIP = request => this.client.fetch({
|
|
53
89
|
method: 'DELETE',
|
|
54
90
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}`
|
|
55
91
|
});
|
|
92
|
+
/**
|
|
93
|
+
* Attach a Flexible IP to a server
|
|
94
|
+
*
|
|
95
|
+
* @param request - The request {@link AttachFlexibleIPRequest}
|
|
96
|
+
* @returns A Promise of AttachFlexibleIPsResponse
|
|
97
|
+
*/
|
|
56
98
|
this.attachFlexibleIP = request => this.client.fetch({
|
|
57
99
|
body: JSON.stringify(marshalAttachFlexibleIPRequest(request, this.client.settings)),
|
|
58
100
|
headers: jsonContentHeaders,
|
|
59
101
|
method: 'POST',
|
|
60
102
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/attach`
|
|
61
103
|
}, unmarshalAttachFlexibleIPsResponse);
|
|
104
|
+
/**
|
|
105
|
+
* Detach a Flexible IP from a server
|
|
106
|
+
*
|
|
107
|
+
* @param request - The request {@link DetachFlexibleIPRequest}
|
|
108
|
+
* @returns A Promise of DetachFlexibleIPsResponse
|
|
109
|
+
*/
|
|
62
110
|
this.detachFlexibleIP = request => this.client.fetch({
|
|
63
111
|
body: JSON.stringify(marshalDetachFlexibleIPRequest(request, this.client.settings)),
|
|
64
112
|
headers: jsonContentHeaders,
|
|
65
113
|
method: 'POST',
|
|
66
114
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/detach`
|
|
67
115
|
}, unmarshalDetachFlexibleIPsResponse);
|
|
116
|
+
/**
|
|
117
|
+
* Generate a virtual MAC on a given Flexible IP
|
|
118
|
+
*
|
|
119
|
+
* @param request - The request {@link GenerateMACAddrRequest}
|
|
120
|
+
* @returns A Promise of FlexibleIP
|
|
121
|
+
*/
|
|
68
122
|
this.generateMACAddr = request => this.client.fetch({
|
|
69
123
|
body: JSON.stringify(marshalGenerateMACAddrRequest(request, this.client.settings)),
|
|
70
124
|
headers: jsonContentHeaders,
|
|
71
125
|
method: 'POST',
|
|
72
126
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac`
|
|
73
127
|
}, unmarshalFlexibleIP);
|
|
128
|
+
/**
|
|
129
|
+
* Duplicate a Virtual MAC from a given Flexible IP onto another attached on
|
|
130
|
+
* the same server.
|
|
131
|
+
*
|
|
132
|
+
* @param request - The request {@link DuplicateMACAddrRequest}
|
|
133
|
+
* @returns A Promise of FlexibleIP
|
|
134
|
+
*/
|
|
74
135
|
this.duplicateMACAddr = request => this.client.fetch({
|
|
75
136
|
body: JSON.stringify(marshalDuplicateMACAddrRequest(request, this.client.settings)),
|
|
76
137
|
headers: jsonContentHeaders,
|
|
@@ -83,12 +144,18 @@ class API extends API$1 {
|
|
|
83
144
|
method: 'POST',
|
|
84
145
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac/move`
|
|
85
146
|
}, unmarshalFlexibleIP);
|
|
147
|
+
/**
|
|
148
|
+
* Remove a virtual MAC from a Flexible IP
|
|
149
|
+
*
|
|
150
|
+
* @param request - The request {@link DeleteMACAddrRequest}
|
|
151
|
+
*/
|
|
86
152
|
this.deleteMACAddr = request => this.client.fetch({
|
|
87
153
|
method: 'DELETE',
|
|
88
154
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam('fipId', request.fipId)}/mac`
|
|
89
155
|
});
|
|
90
156
|
}
|
|
91
157
|
}
|
|
158
|
+
/** Lists the available zones of the API. */
|
|
92
159
|
API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
|
|
93
160
|
|
|
94
161
|
export { API };
|
|
@@ -27,20 +27,45 @@ class API extends API$1 {
|
|
|
27
27
|
return _this.client.fetch({
|
|
28
28
|
method: 'GET',
|
|
29
29
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`,
|
|
30
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId
|
|
30
|
+
urlParams: urlParams(['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], ['project_id', request.projectId])
|
|
31
31
|
}, unmarshalListNamespacesResponse);
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* List all your namespaces
|
|
35
|
+
*
|
|
36
|
+
* @param request - The request {@link ListNamespacesRequest}
|
|
37
|
+
* @returns A Promise of ListNamespacesResponse
|
|
38
|
+
*/
|
|
33
39
|
this.listNamespaces = function (request) {
|
|
34
40
|
if (request === void 0) {
|
|
35
41
|
request = {};
|
|
36
42
|
}
|
|
37
43
|
return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
|
|
38
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Get the namespace associated with the given id.
|
|
47
|
+
*
|
|
48
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
49
|
+
* @returns A Promise of Namespace
|
|
50
|
+
*/
|
|
39
51
|
this.getNamespace = request => this.client.fetch({
|
|
40
52
|
method: 'GET',
|
|
41
53
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
42
54
|
}, unmarshalNamespace);
|
|
55
|
+
/**
|
|
56
|
+
* Waits for {@link Namespace} to be in a final state.
|
|
57
|
+
*
|
|
58
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
59
|
+
* @param options - The waiting options
|
|
60
|
+
* @returns A Promise of Namespace
|
|
61
|
+
*/
|
|
43
62
|
this.waitForNamespace = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
63
|
+
/**
|
|
64
|
+
* Create a new namespace
|
|
65
|
+
*
|
|
66
|
+
* @param request - The request {@link CreateNamespaceRequest}
|
|
67
|
+
* @returns A Promise of Namespace
|
|
68
|
+
*/
|
|
44
69
|
this.createNamespace = function (request) {
|
|
45
70
|
if (request === void 0) {
|
|
46
71
|
request = {};
|
|
@@ -52,12 +77,24 @@ class API extends API$1 {
|
|
|
52
77
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`
|
|
53
78
|
}, unmarshalNamespace);
|
|
54
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Update the space associated with the given id.
|
|
82
|
+
*
|
|
83
|
+
* @param request - The request {@link UpdateNamespaceRequest}
|
|
84
|
+
* @returns A Promise of Namespace
|
|
85
|
+
*/
|
|
55
86
|
this.updateNamespace = request => this.client.fetch({
|
|
56
87
|
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
57
88
|
headers: jsonContentHeaders,
|
|
58
89
|
method: 'PATCH',
|
|
59
90
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
60
91
|
}, unmarshalNamespace);
|
|
92
|
+
/**
|
|
93
|
+
* Delete the namespace associated with the given id.
|
|
94
|
+
*
|
|
95
|
+
* @param request - The request {@link DeleteNamespaceRequest}
|
|
96
|
+
* @returns A Promise of Namespace
|
|
97
|
+
*/
|
|
61
98
|
this.deleteNamespace = request => this.client.fetch({
|
|
62
99
|
method: 'DELETE',
|
|
63
100
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
@@ -65,36 +102,85 @@ class API extends API$1 {
|
|
|
65
102
|
this.pageOfListFunctions = request => this.client.fetch({
|
|
66
103
|
method: 'GET',
|
|
67
104
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`,
|
|
68
|
-
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId
|
|
105
|
+
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['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])
|
|
69
106
|
}, unmarshalListFunctionsResponse);
|
|
107
|
+
/**
|
|
108
|
+
* List all your functions
|
|
109
|
+
*
|
|
110
|
+
* @param request - The request {@link ListFunctionsRequest}
|
|
111
|
+
* @returns A Promise of ListFunctionsResponse
|
|
112
|
+
*/
|
|
70
113
|
this.listFunctions = request => enrichForPagination('functions', this.pageOfListFunctions, request);
|
|
114
|
+
/**
|
|
115
|
+
* Get the function associated with the given id.
|
|
116
|
+
*
|
|
117
|
+
* @param request - The request {@link GetFunctionRequest}
|
|
118
|
+
* @returns A Promise of Function
|
|
119
|
+
*/
|
|
71
120
|
this.getFunction = request => this.client.fetch({
|
|
72
121
|
method: 'GET',
|
|
73
122
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
74
123
|
}, unmarshalFunction);
|
|
124
|
+
/**
|
|
125
|
+
* Waits for {@link Function} to be in a final state.
|
|
126
|
+
*
|
|
127
|
+
* @param request - The request {@link GetFunctionRequest}
|
|
128
|
+
* @param options - The waiting options
|
|
129
|
+
* @returns A Promise of Function
|
|
130
|
+
*/
|
|
75
131
|
this.waitForFunction = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!FUNCTION_TRANSIENT_STATUSES.includes(res.status))), this.getFunction, request, options);
|
|
132
|
+
/**
|
|
133
|
+
* Create a new function
|
|
134
|
+
*
|
|
135
|
+
* @param request - The request {@link CreateFunctionRequest}
|
|
136
|
+
* @returns A Promise of Function
|
|
137
|
+
*/
|
|
76
138
|
this.createFunction = request => this.client.fetch({
|
|
77
139
|
body: JSON.stringify(marshalCreateFunctionRequest(request, this.client.settings)),
|
|
78
140
|
headers: jsonContentHeaders,
|
|
79
141
|
method: 'POST',
|
|
80
142
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`
|
|
81
143
|
}, unmarshalFunction);
|
|
144
|
+
/**
|
|
145
|
+
* Update the function associated with the given id.
|
|
146
|
+
*
|
|
147
|
+
* @param request - The request {@link UpdateFunctionRequest}
|
|
148
|
+
* @returns A Promise of Function
|
|
149
|
+
*/
|
|
82
150
|
this.updateFunction = request => this.client.fetch({
|
|
83
151
|
body: JSON.stringify(marshalUpdateFunctionRequest(request, this.client.settings)),
|
|
84
152
|
headers: jsonContentHeaders,
|
|
85
153
|
method: 'PATCH',
|
|
86
154
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
87
155
|
}, unmarshalFunction);
|
|
156
|
+
/**
|
|
157
|
+
* Delete the function associated with the given id.
|
|
158
|
+
*
|
|
159
|
+
* @param request - The request {@link DeleteFunctionRequest}
|
|
160
|
+
* @returns A Promise of Function
|
|
161
|
+
*/
|
|
88
162
|
this.deleteFunction = request => this.client.fetch({
|
|
89
163
|
method: 'DELETE',
|
|
90
164
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
91
165
|
}, unmarshalFunction);
|
|
166
|
+
/**
|
|
167
|
+
* Deploy a function associated with the given id.
|
|
168
|
+
*
|
|
169
|
+
* @param request - The request {@link DeployFunctionRequest}
|
|
170
|
+
* @returns A Promise of Function
|
|
171
|
+
*/
|
|
92
172
|
this.deployFunction = request => this.client.fetch({
|
|
93
173
|
body: '{}',
|
|
94
174
|
headers: jsonContentHeaders,
|
|
95
175
|
method: 'POST',
|
|
96
176
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/deploy`
|
|
97
177
|
}, unmarshalFunction);
|
|
178
|
+
/**
|
|
179
|
+
* List available function runtimes.
|
|
180
|
+
*
|
|
181
|
+
* @param request - The request {@link ListFunctionRuntimesRequest}
|
|
182
|
+
* @returns A Promise of ListFunctionRuntimesResponse
|
|
183
|
+
*/
|
|
98
184
|
this.listFunctionRuntimes = function (request) {
|
|
99
185
|
if (request === void 0) {
|
|
100
186
|
request = {};
|
|
@@ -104,11 +190,23 @@ class API extends API$1 {
|
|
|
104
190
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/runtimes`
|
|
105
191
|
}, unmarshalListFunctionRuntimesResponse);
|
|
106
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Get an upload URL of a function associated with the given id.
|
|
195
|
+
*
|
|
196
|
+
* @param request - The request {@link GetFunctionUploadURLRequest}
|
|
197
|
+
* @returns A Promise of UploadURL
|
|
198
|
+
*/
|
|
107
199
|
this.getFunctionUploadURL = request => this.client.fetch({
|
|
108
200
|
method: 'GET',
|
|
109
201
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/upload-url`,
|
|
110
202
|
urlParams: urlParams(['content_length', request.contentLength])
|
|
111
203
|
}, unmarshalUploadURL);
|
|
204
|
+
/**
|
|
205
|
+
* Get a download URL for a function associated with the given id.
|
|
206
|
+
*
|
|
207
|
+
* @param request - The request {@link GetFunctionDownloadURLRequest}
|
|
208
|
+
* @returns A Promise of DownloadURL
|
|
209
|
+
*/
|
|
112
210
|
this.getFunctionDownloadURL = request => this.client.fetch({
|
|
113
211
|
method: 'GET',
|
|
114
212
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/download-url`
|
|
@@ -118,24 +216,61 @@ class API extends API$1 {
|
|
|
118
216
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
|
|
119
217
|
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
120
218
|
}, unmarshalListCronsResponse);
|
|
219
|
+
/**
|
|
220
|
+
* List all your crons
|
|
221
|
+
*
|
|
222
|
+
* @param request - The request {@link ListCronsRequest}
|
|
223
|
+
* @returns A Promise of ListCronsResponse
|
|
224
|
+
*/
|
|
121
225
|
this.listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
|
|
226
|
+
/**
|
|
227
|
+
* Get the cron associated with the given id.
|
|
228
|
+
*
|
|
229
|
+
* @param request - The request {@link GetCronRequest}
|
|
230
|
+
* @returns A Promise of Cron
|
|
231
|
+
*/
|
|
122
232
|
this.getCron = request => this.client.fetch({
|
|
123
233
|
method: 'GET',
|
|
124
234
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
125
235
|
}, unmarshalCron);
|
|
236
|
+
/**
|
|
237
|
+
* Waits for {@link Cron} to be in a final state.
|
|
238
|
+
*
|
|
239
|
+
* @param request - The request {@link GetCronRequest}
|
|
240
|
+
* @param options - The waiting options
|
|
241
|
+
* @returns A Promise of Cron
|
|
242
|
+
*/
|
|
126
243
|
this.waitForCron = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
244
|
+
/**
|
|
245
|
+
* Create a new cron
|
|
246
|
+
*
|
|
247
|
+
* @param request - The request {@link CreateCronRequest}
|
|
248
|
+
* @returns A Promise of Cron
|
|
249
|
+
*/
|
|
127
250
|
this.createCron = request => this.client.fetch({
|
|
128
251
|
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
129
252
|
headers: jsonContentHeaders,
|
|
130
253
|
method: 'POST',
|
|
131
254
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
132
255
|
}, unmarshalCron);
|
|
256
|
+
/**
|
|
257
|
+
* Update the cron associated with the given id.
|
|
258
|
+
*
|
|
259
|
+
* @param request - The request {@link UpdateCronRequest}
|
|
260
|
+
* @returns A Promise of Cron
|
|
261
|
+
*/
|
|
133
262
|
this.updateCron = request => this.client.fetch({
|
|
134
263
|
body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
|
|
135
264
|
headers: jsonContentHeaders,
|
|
136
265
|
method: 'PATCH',
|
|
137
266
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
138
267
|
}, unmarshalCron);
|
|
268
|
+
/**
|
|
269
|
+
* Delete the cron associated with the given id.
|
|
270
|
+
*
|
|
271
|
+
* @param request - The request {@link DeleteCronRequest}
|
|
272
|
+
* @returns A Promise of Cron
|
|
273
|
+
*/
|
|
139
274
|
this.deleteCron = request => this.client.fetch({
|
|
140
275
|
method: 'DELETE',
|
|
141
276
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
@@ -145,28 +280,66 @@ class API extends API$1 {
|
|
|
145
280
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/logs`,
|
|
146
281
|
urlParams: urlParams(['order_by', request.orderBy ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
147
282
|
}, unmarshalListLogsResponse);
|
|
283
|
+
/**
|
|
284
|
+
* List your application logs
|
|
285
|
+
*
|
|
286
|
+
* @param request - The request {@link ListLogsRequest}
|
|
287
|
+
* @returns A Promise of ListLogsResponse
|
|
288
|
+
*/
|
|
148
289
|
this.listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
|
|
149
290
|
this.pageOfListDomains = request => this.client.fetch({
|
|
150
291
|
method: 'GET',
|
|
151
292
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
152
293
|
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
153
294
|
}, unmarshalListDomainsResponse);
|
|
295
|
+
/**
|
|
296
|
+
* List all domain name bindings
|
|
297
|
+
*
|
|
298
|
+
* @param request - The request {@link ListDomainsRequest}
|
|
299
|
+
* @returns A Promise of ListDomainsResponse
|
|
300
|
+
*/
|
|
154
301
|
this.listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
302
|
+
/**
|
|
303
|
+
* Get a domain name binding
|
|
304
|
+
*
|
|
305
|
+
* @param request - The request {@link GetDomainRequest}
|
|
306
|
+
* @returns A Promise of Domain
|
|
307
|
+
*/
|
|
155
308
|
this.getDomain = request => this.client.fetch({
|
|
156
309
|
method: 'GET',
|
|
157
310
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
158
311
|
}, unmarshalDomain);
|
|
312
|
+
/**
|
|
313
|
+
* Waits for {@link Domain} to be in a final state.
|
|
314
|
+
*
|
|
315
|
+
* @param request - The request {@link GetDomainRequest}
|
|
316
|
+
* @param options - The waiting options
|
|
317
|
+
* @returns A Promise of Domain
|
|
318
|
+
*/
|
|
159
319
|
this.waitForDomain = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
320
|
+
/**
|
|
321
|
+
* Create a domain name binding
|
|
322
|
+
*
|
|
323
|
+
* @param request - The request {@link CreateDomainRequest}
|
|
324
|
+
* @returns A Promise of Domain
|
|
325
|
+
*/
|
|
160
326
|
this.createDomain = request => this.client.fetch({
|
|
161
327
|
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
162
328
|
headers: jsonContentHeaders,
|
|
163
329
|
method: 'POST',
|
|
164
330
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
165
331
|
}, unmarshalDomain);
|
|
332
|
+
/**
|
|
333
|
+
* Delete a domain name binding
|
|
334
|
+
*
|
|
335
|
+
* @param request - The request {@link DeleteDomainRequest}
|
|
336
|
+
* @returns A Promise of Domain
|
|
337
|
+
*/
|
|
166
338
|
this.deleteDomain = request => this.client.fetch({
|
|
167
339
|
method: 'DELETE',
|
|
168
340
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
169
341
|
}, unmarshalDomain);
|
|
342
|
+
/** @deprecated */
|
|
170
343
|
this.issueJWT = function (request) {
|
|
171
344
|
if (request === void 0) {
|
|
172
345
|
request = {};
|
|
@@ -183,6 +356,12 @@ class API extends API$1 {
|
|
|
183
356
|
}])))
|
|
184
357
|
}, unmarshalToken);
|
|
185
358
|
};
|
|
359
|
+
/**
|
|
360
|
+
* Create a new revocable token
|
|
361
|
+
*
|
|
362
|
+
* @param request - The request {@link CreateTokenRequest}
|
|
363
|
+
* @returns A Promise of Token
|
|
364
|
+
*/
|
|
186
365
|
this.createToken = function (request) {
|
|
187
366
|
if (request === void 0) {
|
|
188
367
|
request = {};
|
|
@@ -194,10 +373,23 @@ class API extends API$1 {
|
|
|
194
373
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/tokens`
|
|
195
374
|
}, unmarshalToken);
|
|
196
375
|
};
|
|
376
|
+
/**
|
|
377
|
+
* Get a token
|
|
378
|
+
*
|
|
379
|
+
* @param request - The request {@link GetTokenRequest}
|
|
380
|
+
* @returns A Promise of Token
|
|
381
|
+
*/
|
|
197
382
|
this.getToken = request => this.client.fetch({
|
|
198
383
|
method: 'GET',
|
|
199
384
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
200
385
|
}, unmarshalToken);
|
|
386
|
+
/**
|
|
387
|
+
* Waits for {@link Token} to be in a final state.
|
|
388
|
+
*
|
|
389
|
+
* @param request - The request {@link GetTokenRequest}
|
|
390
|
+
* @param options - The waiting options
|
|
391
|
+
* @returns A Promise of Token
|
|
392
|
+
*/
|
|
201
393
|
this.waitForToken = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
202
394
|
this.pageOfListTokens = function (request) {
|
|
203
395
|
if (request === void 0) {
|
|
@@ -209,12 +401,24 @@ class API extends API$1 {
|
|
|
209
401
|
urlParams: urlParams(['function_id', request.functionId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
|
|
210
402
|
}, unmarshalListTokensResponse);
|
|
211
403
|
};
|
|
404
|
+
/**
|
|
405
|
+
* List all tokens
|
|
406
|
+
*
|
|
407
|
+
* @param request - The request {@link ListTokensRequest}
|
|
408
|
+
* @returns A Promise of ListTokensResponse
|
|
409
|
+
*/
|
|
212
410
|
this.listTokens = function (request) {
|
|
213
411
|
if (request === void 0) {
|
|
214
412
|
request = {};
|
|
215
413
|
}
|
|
216
414
|
return enrichForPagination('tokens', _this.pageOfListTokens, request);
|
|
217
415
|
};
|
|
416
|
+
/**
|
|
417
|
+
* Delete a token
|
|
418
|
+
*
|
|
419
|
+
* @param request - The request {@link DeleteTokenRequest}
|
|
420
|
+
* @returns A Promise of Token
|
|
421
|
+
*/
|
|
218
422
|
this.deleteToken = request => this.client.fetch({
|
|
219
423
|
method: 'DELETE',
|
|
220
424
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
@@ -229,6 +433,13 @@ class API extends API$1 {
|
|
|
229
433
|
method: 'GET',
|
|
230
434
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
231
435
|
}, unmarshalTrigger);
|
|
436
|
+
/**
|
|
437
|
+
* Waits for {@link Trigger} to be in a final state.
|
|
438
|
+
*
|
|
439
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
440
|
+
* @param options - The waiting options
|
|
441
|
+
* @returns A Promise of Trigger
|
|
442
|
+
*/
|
|
232
443
|
this.waitForTrigger = (request, options) => waitForResource((options == null ? void 0 : options.stop) ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
233
444
|
this.pageOfListTriggers = function (request) {
|
|
234
445
|
if (request === void 0) {
|
|
@@ -268,6 +479,7 @@ class API extends API$1 {
|
|
|
268
479
|
}, unmarshalTrigger);
|
|
269
480
|
}
|
|
270
481
|
}
|
|
482
|
+
/** Lists the available regions of the API. */
|
|
271
483
|
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
272
484
|
|
|
273
485
|
export { API };
|
|
@@ -18,6 +18,8 @@ const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
20
|
mnqNamespaceId: data.mnq_namespace_id,
|
|
21
|
+
mnqProjectId: data.mnq_project_id,
|
|
22
|
+
mnqRegion: data.mnq_region,
|
|
21
23
|
subject: data.subject
|
|
22
24
|
};
|
|
23
25
|
};
|
|
@@ -27,6 +29,8 @@ const unmarshalTriggerMnqSqsClientConfig = data => {
|
|
|
27
29
|
}
|
|
28
30
|
return {
|
|
29
31
|
mnqNamespaceId: data.mnq_namespace_id,
|
|
32
|
+
mnqProjectId: data.mnq_project_id,
|
|
33
|
+
mnqRegion: data.mnq_region,
|
|
30
34
|
queue: data.queue
|
|
31
35
|
};
|
|
32
36
|
};
|
|
@@ -266,10 +270,14 @@ const unmarshalUploadURL = data => {
|
|
|
266
270
|
};
|
|
267
271
|
const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
268
272
|
mnq_namespace_id: request.mnqNamespaceId,
|
|
273
|
+
mnq_project_id: request.mnqProjectId,
|
|
274
|
+
mnq_region: request.mnqRegion,
|
|
269
275
|
subject: request.subject
|
|
270
276
|
});
|
|
271
277
|
const marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
272
278
|
mnq_namespace_id: request.mnqNamespaceId,
|
|
279
|
+
mnq_project_id: request.mnqProjectId,
|
|
280
|
+
mnq_region: request.mnqRegion,
|
|
273
281
|
queue: request.queue
|
|
274
282
|
});
|
|
275
283
|
const marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
@@ -284,10 +292,14 @@ const marshalSecret = (request, defaults) => ({
|
|
|
284
292
|
});
|
|
285
293
|
const marshalUpdateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
286
294
|
mnq_namespace_id: request.mnqNamespaceId,
|
|
295
|
+
mnq_project_id: request.mnqProjectId,
|
|
296
|
+
mnq_region: request.mnqRegion,
|
|
287
297
|
subject: request.subject
|
|
288
298
|
});
|
|
289
299
|
const marshalUpdateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
290
300
|
mnq_namespace_id: request.mnqNamespaceId,
|
|
301
|
+
mnq_project_id: request.mnqProjectId,
|
|
302
|
+
mnq_region: request.mnqRegion,
|
|
291
303
|
queue: request.queue
|
|
292
304
|
});
|
|
293
305
|
const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|