@scaleway/sdk 2.60.0 → 2.62.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/index.gen.d.ts +2 -2
- package/dist/api/account/v2/index.gen.d.ts +1 -1
- package/dist/api/account/v3/api.gen.cjs +106 -0
- package/dist/api/account/v3/api.gen.d.ts +53 -1
- package/dist/api/account/v3/api.gen.js +108 -2
- package/dist/api/account/v3/index.gen.cjs +1 -0
- package/dist/api/account/v3/index.gen.d.ts +3 -3
- package/dist/api/account/v3/index.gen.js +2 -1
- package/dist/api/account/v3/marshalling.gen.cjs +71 -0
- package/dist/api/account/v3/marshalling.gen.d.ts +6 -1
- package/dist/api/account/v3/marshalling.gen.js +71 -0
- package/dist/api/account/v3/types.gen.d.ts +81 -0
- package/dist/api/account/v3/validation-rules.gen.cjs +22 -0
- package/dist/api/account/v3/validation-rules.gen.d.ts +19 -0
- package/dist/api/account/v3/validation-rules.gen.js +22 -0
- package/dist/api/applesilicon/index.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +2 -2
- package/dist/api/audit_trail/index.gen.d.ts +1 -1
- package/dist/api/audit_trail/v1alpha1/index.gen.d.ts +2 -2
- package/dist/api/baremetal/index.gen.d.ts +2 -2
- package/dist/api/baremetal/v1/api.utils.d.ts +2 -2
- package/dist/api/baremetal/v1/index.d.ts +4 -4
- package/dist/api/baremetal/v1/index.gen.d.ts +3 -3
- package/dist/api/baremetal/v3/index.gen.d.ts +2 -2
- package/dist/api/billing/index.gen.d.ts +2 -2
- package/dist/api/billing/v2alpha1/index.gen.d.ts +1 -1
- package/dist/api/billing/v2beta1/index.gen.d.ts +1 -1
- package/dist/api/block/index.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/cockpit/index.gen.d.ts +2 -2
- package/dist/api/cockpit/v1/index.gen.d.ts +2 -2
- package/dist/api/cockpit/v1beta1/index.gen.d.ts +2 -2
- package/dist/api/container/index.gen.d.ts +1 -1
- package/dist/api/container/v1beta1/api.gen.cjs +6 -8
- package/dist/api/container/v1beta1/api.gen.d.ts +6 -8
- package/dist/api/container/v1beta1/api.gen.js +6 -8
- package/dist/api/container/v1beta1/index.gen.d.ts +3 -3
- package/dist/api/dedibox/index.gen.d.ts +1 -1
- package/dist/api/dedibox/v1/index.gen.d.ts +3 -3
- package/dist/api/document_db/index.gen.d.ts +1 -1
- package/dist/api/document_db/v1beta1/index.gen.d.ts +3 -3
- package/dist/api/domain/index.gen.d.ts +1 -1
- package/dist/api/domain/v2beta1/index.gen.d.ts +2 -2
- package/dist/api/edge_services/index.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/index.gen.d.ts +2 -2
- package/dist/api/flexibleip/index.gen.d.ts +1 -1
- package/dist/api/flexibleip/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/function/index.gen.d.ts +1 -1
- package/dist/api/function/v1beta1/index.gen.d.ts +3 -3
- package/dist/api/iam/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/api.gen.cjs +46 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +24 -1
- package/dist/api/iam/v1alpha1/api.gen.js +47 -1
- package/dist/api/iam/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +27 -2
- package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +28 -3
- package/dist/api/iam/v1alpha1/types.gen.d.ts +21 -5
- package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +6 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +5 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +7 -1
- package/dist/api/index.d.ts +16 -16
- package/dist/api/index.gen.d.ts +41 -41
- package/dist/api/inference/index.gen.d.ts +1 -1
- package/dist/api/inference/v1beta1/index.gen.d.ts +3 -3
- package/dist/api/instance/index.gen.d.ts +1 -1
- package/dist/api/instance/v1/api.utils.d.ts +2 -2
- package/dist/api/instance/v1/index.d.ts +2 -2
- package/dist/api/instance/v1/index.gen.d.ts +2 -2
- package/dist/api/interlink/index.gen.d.ts +1 -1
- package/dist/api/interlink/v1beta1/index.gen.d.ts +2 -2
- package/dist/api/iot/index.gen.d.ts +1 -1
- package/dist/api/iot/v1/index.gen.d.ts +2 -2
- package/dist/api/ipam/index.gen.d.ts +1 -1
- package/dist/api/ipam/v1/index.gen.d.ts +2 -2
- package/dist/api/ipfs/index.gen.d.ts +1 -1
- package/dist/api/ipfs/v1alpha1/index.gen.d.ts +2 -2
- package/dist/api/jobs/index.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/api.gen.cjs +2 -1
- package/dist/api/jobs/v1alpha1/api.gen.js +2 -1
- package/dist/api/jobs/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +1 -0
- package/dist/api/k8s/index.gen.d.ts +1 -1
- package/dist/api/k8s/v1/api.utils.d.ts +1 -1
- package/dist/api/k8s/v1/index.d.ts +3 -3
- package/dist/api/k8s/v1/index.gen.d.ts +3 -3
- package/dist/api/key_manager/index.gen.d.ts +1 -1
- package/dist/api/key_manager/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/lb/index.gen.d.ts +1 -1
- package/dist/api/lb/v1/api.utils.d.ts +2 -2
- package/dist/api/lb/v1/index.d.ts +2 -2
- package/dist/api/lb/v1/index.gen.d.ts +2 -2
- package/dist/api/llm_inference/index.gen.d.ts +1 -1
- package/dist/api/llm_inference/v1beta1/index.gen.d.ts +3 -3
- package/dist/api/marketplace/index.gen.d.ts +1 -1
- package/dist/api/marketplace/v2/index.gen.d.ts +1 -1
- package/dist/api/mnq/index.gen.d.ts +1 -1
- package/dist/api/mnq/v1beta1/index.gen.d.ts +2 -2
- package/dist/api/mongodb/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/qaas/index.gen.d.ts +1 -1
- package/dist/api/qaas/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/rdb/index.gen.d.ts +1 -1
- package/dist/api/rdb/v1/index.gen.d.ts +3 -3
- package/dist/api/redis/index.gen.d.ts +1 -1
- package/dist/api/redis/v1/index.gen.d.ts +2 -2
- package/dist/api/registry/index.gen.d.ts +1 -1
- package/dist/api/registry/v1/index.gen.d.ts +2 -2
- package/dist/api/secret/index.gen.d.ts +2 -2
- package/dist/api/secret/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/index.gen.d.ts +2 -2
- package/dist/api/serverless_sqldb/index.gen.d.ts +1 -1
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.d.ts +3 -3
- package/dist/api/tem/index.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/api.gen.cjs +54 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +27 -1
- package/dist/api/tem/v1alpha1/api.gen.js +55 -1
- package/dist/api/tem/v1alpha1/index.gen.d.ts +4 -4
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +48 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +48 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +84 -1
- package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +16 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +14 -0
- package/dist/api/tem/v1alpha1/validation-rules.gen.js +16 -0
- package/dist/api/test/index.gen.d.ts +1 -1
- package/dist/api/test/v1/index.gen.d.ts +2 -2
- package/dist/api/vpc/index.gen.d.ts +2 -2
- package/dist/api/vpc/v1/index.gen.d.ts +1 -1
- package/dist/api/vpc/v2/index.gen.d.ts +2 -2
- package/dist/api/vpcgw/index.gen.d.ts +2 -2
- package/dist/api/vpcgw/v1/index.gen.d.ts +2 -2
- package/dist/api/vpcgw/v2/api.gen.cjs +47 -0
- package/dist/api/vpcgw/v2/api.gen.d.ts +25 -1
- package/dist/api/vpcgw/v2/api.gen.js +48 -1
- package/dist/api/vpcgw/v2/index.gen.d.ts +3 -3
- package/dist/api/vpcgw/v2/marshalling.gen.cjs +31 -0
- package/dist/api/vpcgw/v2/marshalling.gen.d.ts +5 -1
- package/dist/api/vpcgw/v2/marshalling.gen.js +31 -0
- package/dist/api/vpcgw/v2/types.gen.d.ts +37 -0
- package/dist/api/webhosting/index.gen.d.ts +2 -2
- package/dist/api/webhosting/v1/index.gen.d.ts +3 -3
- package/dist/api/webhosting/v1/types.gen.d.ts +1 -1
- package/dist/api/webhosting/v1alpha1/index.gen.d.ts +3 -3
- package/dist/bridge.d.ts +10 -10
- package/dist/index.d.ts +11 -11
- package/dist/internal/logger/console-logger.d.ts +1 -1
- package/dist/internal/logger/index.d.ts +1 -1
- package/dist/internal/logger/logger.d.ts +1 -1
- package/dist/internals.d.ts +10 -10
- package/dist/scw/api.d.ts +1 -1
- package/dist/scw/auth.d.ts +1 -1
- package/dist/scw/client-ini-factory.d.ts +3 -3
- package/dist/scw/client-settings.d.ts +1 -1
- package/dist/scw/client.d.ts +3 -3
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.d.ts +2 -2
- package/dist/scw/errors/error-parser.d.ts +2 -2
- package/dist/scw/errors/non-standard/invalid-request-mapper.d.ts +4 -4
- package/dist/scw/errors/non-standard/unknown-resource-mapper.d.ts +3 -3
- package/dist/scw/errors/scw-error-from-json.d.ts +2 -2
- package/dist/scw/errors/scw-error.d.ts +1 -1
- package/dist/scw/errors/standard/already-exists-error.d.ts +2 -2
- package/dist/scw/errors/standard/denied-authentication-error.d.ts +2 -2
- package/dist/scw/errors/standard/index.d.ts +17 -17
- package/dist/scw/errors/standard/invalid-arguments-error.d.ts +2 -2
- package/dist/scw/errors/standard/out-of-stock-error.d.ts +2 -2
- package/dist/scw/errors/standard/permissions-denied-error.d.ts +2 -2
- package/dist/scw/errors/standard/precondition-failed-error.d.ts +2 -2
- package/dist/scw/errors/standard/quotas-exceeded-error.d.ts +2 -2
- package/dist/scw/errors/standard/resource-expired-error.d.ts +2 -2
- package/dist/scw/errors/standard/resource-locked-error.d.ts +2 -2
- package/dist/scw/errors/standard/resource-not-found-error.d.ts +2 -2
- package/dist/scw/errors/standard/too-many-requests-error.d.ts +2 -2
- package/dist/scw/errors/standard/transient-state-error.d.ts +2 -2
- package/dist/scw/fetch/build-fetcher.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, Domain, DomainLastStatus, Email, ListDomainsResponse, ListEmailsResponse, ListWebhookEventsResponse, ListWebhooksResponse, ProjectSettings, Statistics, UpdateDomainRequest, UpdateProjectSettingsRequest, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
2
|
+
import type { BulkCreateBlocklistsRequest, BulkCreateBlocklistsResponse, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, CreateWebhookRequest, Domain, DomainLastStatus, Email, ListBlocklistsResponse, ListDomainsResponse, ListEmailsResponse, ListWebhookEventsResponse, ListWebhooksResponse, ProjectSettings, Statistics, UpdateDomainRequest, UpdateProjectSettingsRequest, UpdateWebhookRequest, Webhook } from './types.gen';
|
|
3
3
|
export declare const unmarshalEmail: (data: unknown) => Email;
|
|
4
4
|
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
5
5
|
export declare const unmarshalWebhook: (data: unknown) => Webhook;
|
|
6
|
+
export declare const unmarshalBulkCreateBlocklistsResponse: (data: unknown) => BulkCreateBlocklistsResponse;
|
|
6
7
|
export declare const unmarshalCreateEmailResponse: (data: unknown) => CreateEmailResponse;
|
|
7
8
|
export declare const unmarshalDomainLastStatus: (data: unknown) => DomainLastStatus;
|
|
9
|
+
export declare const unmarshalListBlocklistsResponse: (data: unknown) => ListBlocklistsResponse;
|
|
8
10
|
export declare const unmarshalListDomainsResponse: (data: unknown) => ListDomainsResponse;
|
|
9
11
|
export declare const unmarshalListEmailsResponse: (data: unknown) => ListEmailsResponse;
|
|
10
12
|
export declare const unmarshalListWebhookEventsResponse: (data: unknown) => ListWebhookEventsResponse;
|
|
11
13
|
export declare const unmarshalListWebhooksResponse: (data: unknown) => ListWebhooksResponse;
|
|
12
14
|
export declare const unmarshalProjectSettings: (data: unknown) => ProjectSettings;
|
|
13
15
|
export declare const unmarshalStatistics: (data: unknown) => Statistics;
|
|
16
|
+
export declare const marshalBulkCreateBlocklistsRequest: (request: BulkCreateBlocklistsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
17
|
export declare const marshalCreateDomainRequest: (request: CreateDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
18
|
export declare const marshalCreateEmailRequest: (request: CreateEmailRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
19
|
export declare const marshalCreateWebhookRequest: (request: CreateWebhookRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -130,6 +130,34 @@ const unmarshalWebhook = (data) => {
|
|
|
130
130
|
updatedAt: unmarshalDate(data.updated_at)
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
|
+
const unmarshalBlocklist = (data) => {
|
|
134
|
+
if (!isJSONObject(data)) {
|
|
135
|
+
throw new TypeError(
|
|
136
|
+
`Unmarshalling the type 'Blocklist' failed as data isn't a dictionary.`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
createdAt: unmarshalDate(data.created_at),
|
|
141
|
+
custom: data.custom,
|
|
142
|
+
domainId: data.domain_id,
|
|
143
|
+
email: data.email,
|
|
144
|
+
endsAt: unmarshalDate(data.ends_at),
|
|
145
|
+
id: data.id,
|
|
146
|
+
reason: data.reason,
|
|
147
|
+
type: data.type,
|
|
148
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
const unmarshalBulkCreateBlocklistsResponse = (data) => {
|
|
152
|
+
if (!isJSONObject(data)) {
|
|
153
|
+
throw new TypeError(
|
|
154
|
+
`Unmarshalling the type 'BulkCreateBlocklistsResponse' failed as data isn't a dictionary.`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
blocklists: unmarshalArrayOfObject(data.blocklists, unmarshalBlocklist)
|
|
159
|
+
};
|
|
160
|
+
};
|
|
133
161
|
const unmarshalCreateEmailResponse = (data) => {
|
|
134
162
|
if (!isJSONObject(data)) {
|
|
135
163
|
throw new TypeError(
|
|
@@ -203,6 +231,17 @@ const unmarshalDomainLastStatus = (data) => {
|
|
|
203
231
|
spfRecord: data.spf_record ? unmarshalDomainLastStatusSpfRecord(data.spf_record) : void 0
|
|
204
232
|
};
|
|
205
233
|
};
|
|
234
|
+
const unmarshalListBlocklistsResponse = (data) => {
|
|
235
|
+
if (!isJSONObject(data)) {
|
|
236
|
+
throw new TypeError(
|
|
237
|
+
`Unmarshalling the type 'ListBlocklistsResponse' failed as data isn't a dictionary.`
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
blocklists: unmarshalArrayOfObject(data.blocklists, unmarshalBlocklist),
|
|
242
|
+
totalCount: data.total_count
|
|
243
|
+
};
|
|
244
|
+
};
|
|
206
245
|
const unmarshalListDomainsResponse = (data) => {
|
|
207
246
|
if (!isJSONObject(data)) {
|
|
208
247
|
throw new TypeError(
|
|
@@ -308,6 +347,12 @@ const unmarshalStatistics = (data) => {
|
|
|
308
347
|
totalCount: data.total_count
|
|
309
348
|
};
|
|
310
349
|
};
|
|
350
|
+
const marshalBulkCreateBlocklistsRequest = (request, defaults) => ({
|
|
351
|
+
domain_id: request.domainId,
|
|
352
|
+
emails: request.emails,
|
|
353
|
+
reason: request.reason,
|
|
354
|
+
type: request.type
|
|
355
|
+
});
|
|
311
356
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
312
357
|
accept_tos: request.acceptTos,
|
|
313
358
|
autoconfig: request.autoconfig,
|
|
@@ -371,16 +416,19 @@ const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
|
371
416
|
sns_arn: request.snsArn
|
|
372
417
|
});
|
|
373
418
|
export {
|
|
419
|
+
marshalBulkCreateBlocklistsRequest,
|
|
374
420
|
marshalCreateDomainRequest,
|
|
375
421
|
marshalCreateEmailRequest,
|
|
376
422
|
marshalCreateWebhookRequest,
|
|
377
423
|
marshalUpdateDomainRequest,
|
|
378
424
|
marshalUpdateProjectSettingsRequest,
|
|
379
425
|
marshalUpdateWebhookRequest,
|
|
426
|
+
unmarshalBulkCreateBlocklistsResponse,
|
|
380
427
|
unmarshalCreateEmailResponse,
|
|
381
428
|
unmarshalDomain,
|
|
382
429
|
unmarshalDomainLastStatus,
|
|
383
430
|
unmarshalEmail,
|
|
431
|
+
unmarshalListBlocklistsResponse,
|
|
384
432
|
unmarshalListDomainsResponse,
|
|
385
433
|
unmarshalListEmailsResponse,
|
|
386
434
|
unmarshalListWebhookEventsResponse,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Region } from '../../../bridge';
|
|
2
|
+
export type BlocklistType = 'unknown_type' | 'mailbox_full' | 'mailbox_not_found';
|
|
2
3
|
export type DomainLastStatusAutoconfigStateReason = 'unknown_reason' | 'permission_denied' | 'domain_not_found';
|
|
3
4
|
export type DomainLastStatusRecordStatus = 'unknown_record_status' | 'valid' | 'invalid' | 'not_found';
|
|
4
5
|
export type DomainReputationStatus = 'unknown_status' | 'excellent' | 'good' | 'average' | 'bad';
|
|
5
6
|
export type DomainStatus = 'unknown' | 'checked' | 'unchecked' | 'invalid' | 'locked' | 'revoked' | 'pending' | 'autoconfiguring';
|
|
6
|
-
export type EmailFlag = 'unknown_flag' | 'soft_bounce' | 'hard_bounce' | 'spam' | 'mailbox_full' | 'mailbox_not_found' | 'greylisted' | 'send_before_expiration';
|
|
7
|
+
export type EmailFlag = 'unknown_flag' | 'soft_bounce' | 'hard_bounce' | 'spam' | 'mailbox_full' | 'mailbox_not_found' | 'greylisted' | 'send_before_expiration' | 'blocklisted';
|
|
7
8
|
export type EmailRcptType = 'unknown_rcpt_type' | 'to' | 'cc' | 'bcc';
|
|
8
9
|
export type EmailStatus = 'unknown' | 'new' | 'sending' | 'sent' | 'failed' | 'canceled';
|
|
10
|
+
export type ListBlocklistsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'ends_at_desc' | 'ends_at_asc';
|
|
9
11
|
export type ListEmailsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'updated_at_desc' | 'updated_at_asc' | 'status_desc' | 'status_asc' | 'mail_from_desc' | 'mail_from_asc' | 'mail_rcpt_desc' | 'mail_rcpt_asc' | 'subject_desc' | 'subject_asc';
|
|
10
12
|
export type ListWebhookEventsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
|
|
11
13
|
export type ListWebhooksRequestOrderBy = 'created_at_desc' | 'created_at_asc';
|
|
@@ -60,6 +62,29 @@ export interface DomainStatistics {
|
|
|
60
62
|
failedCount: number;
|
|
61
63
|
canceledCount: number;
|
|
62
64
|
}
|
|
65
|
+
export interface Blocklist {
|
|
66
|
+
/** ID of the blocklist. */
|
|
67
|
+
id: string;
|
|
68
|
+
/** Domain ID linked to the blocklist. */
|
|
69
|
+
domainId: string;
|
|
70
|
+
/** Date and time of the blocklist creation. */
|
|
71
|
+
createdAt?: Date;
|
|
72
|
+
/** Date and time of the blocklist's last update. */
|
|
73
|
+
updatedAt?: Date;
|
|
74
|
+
/** Date and time when the blocklist ends. Empty if the blocklist has no end. */
|
|
75
|
+
endsAt?: Date;
|
|
76
|
+
/** Email blocked by the blocklist. */
|
|
77
|
+
email: string;
|
|
78
|
+
/** Type of block for this email. */
|
|
79
|
+
type: BlocklistType;
|
|
80
|
+
/** Reason to block this email. */
|
|
81
|
+
reason: string;
|
|
82
|
+
/**
|
|
83
|
+
* True if this blocklist was created manually. False for an automatic
|
|
84
|
+
* Transactional Email blocklist.
|
|
85
|
+
*/
|
|
86
|
+
custom: boolean;
|
|
87
|
+
}
|
|
63
88
|
export interface CreateEmailRequestAddress {
|
|
64
89
|
/** Email address. */
|
|
65
90
|
email: string;
|
|
@@ -259,6 +284,25 @@ export interface UpdateProjectSettingsRequestUpdatePeriodicReport {
|
|
|
259
284
|
*/
|
|
260
285
|
sendingDay?: number;
|
|
261
286
|
}
|
|
287
|
+
export type BulkCreateBlocklistsRequest = {
|
|
288
|
+
/**
|
|
289
|
+
* Region to target. If none is passed will use default region from the
|
|
290
|
+
* config.
|
|
291
|
+
*/
|
|
292
|
+
region?: Region;
|
|
293
|
+
/** Domain ID linked to the blocklist. */
|
|
294
|
+
domainId: string;
|
|
295
|
+
/** Email blocked by the blocklist. */
|
|
296
|
+
emails?: string[];
|
|
297
|
+
/** Type of blocklist. */
|
|
298
|
+
type?: BlocklistType;
|
|
299
|
+
/** Reason to block the email. */
|
|
300
|
+
reason?: string;
|
|
301
|
+
};
|
|
302
|
+
export interface BulkCreateBlocklistsResponse {
|
|
303
|
+
/** List of blocklist created. */
|
|
304
|
+
blocklists: Blocklist[];
|
|
305
|
+
}
|
|
262
306
|
export type CancelEmailRequest = {
|
|
263
307
|
/**
|
|
264
308
|
* Region to target. If none is passed will use default region from the
|
|
@@ -342,6 +386,15 @@ export type CreateWebhookRequest = {
|
|
|
342
386
|
/** Scaleway SNS ARN topic to push the events to. */
|
|
343
387
|
snsArn: string;
|
|
344
388
|
};
|
|
389
|
+
export type DeleteBlocklistRequest = {
|
|
390
|
+
/**
|
|
391
|
+
* Region to target. If none is passed will use default region from the
|
|
392
|
+
* config.
|
|
393
|
+
*/
|
|
394
|
+
region?: Region;
|
|
395
|
+
/** ID of the blocklist to delete. */
|
|
396
|
+
blocklistId: string;
|
|
397
|
+
};
|
|
345
398
|
export type DeleteWebhookRequest = {
|
|
346
399
|
/**
|
|
347
400
|
* Region to target. If none is passed will use default region from the
|
|
@@ -430,6 +483,36 @@ export type GetWebhookRequest = {
|
|
|
430
483
|
/** ID of the Webhook to check. */
|
|
431
484
|
webhookId: string;
|
|
432
485
|
};
|
|
486
|
+
export type ListBlocklistsRequest = {
|
|
487
|
+
/**
|
|
488
|
+
* Region to target. If none is passed will use default region from the
|
|
489
|
+
* config.
|
|
490
|
+
*/
|
|
491
|
+
region?: Region;
|
|
492
|
+
/** (Optional) List blocklist corresponding to specific criteria. */
|
|
493
|
+
orderBy?: ListBlocklistsRequestOrderBy;
|
|
494
|
+
/** (Optional) Requested page number. Value must be greater or equal to 1. */
|
|
495
|
+
page?: number;
|
|
496
|
+
/** (Optional) Requested page size. Value must be between 1 and 100. */
|
|
497
|
+
pageSize?: number;
|
|
498
|
+
/** (Optional) Filter by a domain ID. */
|
|
499
|
+
domainId: string;
|
|
500
|
+
/** (Optional) Filter by an email address. */
|
|
501
|
+
email?: string;
|
|
502
|
+
/** (Optional) Filter by a blocklist type. */
|
|
503
|
+
type?: BlocklistType;
|
|
504
|
+
/**
|
|
505
|
+
* (Optional) Filter by custom blocklist (true) or automatic Transactional
|
|
506
|
+
* Email blocklist (false).
|
|
507
|
+
*/
|
|
508
|
+
custom?: boolean;
|
|
509
|
+
};
|
|
510
|
+
export interface ListBlocklistsResponse {
|
|
511
|
+
/** Number of blocklists matching the requested criteria. */
|
|
512
|
+
totalCount: number;
|
|
513
|
+
/** Single page of blocklists matching the requested criteria. */
|
|
514
|
+
blocklists: Blocklist[];
|
|
515
|
+
}
|
|
433
516
|
export type ListDomainsRequest = {
|
|
434
517
|
/**
|
|
435
518
|
* Region to target. If none is passed will use default region from the
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const BulkCreateBlocklistsRequest = {
|
|
4
|
+
reason: {
|
|
5
|
+
maxLength: 200
|
|
6
|
+
}
|
|
7
|
+
};
|
|
3
8
|
const CreateDomainRequest = {
|
|
4
9
|
domainName: {
|
|
5
10
|
maxLength: 255,
|
|
@@ -42,6 +47,15 @@ const CreateWebhookRequest = {
|
|
|
42
47
|
minLength: 3
|
|
43
48
|
}
|
|
44
49
|
};
|
|
50
|
+
const ListBlocklistsRequest = {
|
|
51
|
+
page: {
|
|
52
|
+
greaterThan: 0
|
|
53
|
+
},
|
|
54
|
+
pageSize: {
|
|
55
|
+
greaterThanOrEqual: 1,
|
|
56
|
+
lessThanOrEqual: 100
|
|
57
|
+
}
|
|
58
|
+
};
|
|
45
59
|
const ListDomainsRequest = {
|
|
46
60
|
page: {
|
|
47
61
|
greaterThan: 0
|
|
@@ -105,12 +119,14 @@ const UpdateWebhookRequest = {
|
|
|
105
119
|
minLength: 3
|
|
106
120
|
}
|
|
107
121
|
};
|
|
122
|
+
exports.BulkCreateBlocklistsRequest = BulkCreateBlocklistsRequest;
|
|
108
123
|
exports.CreateDomainRequest = CreateDomainRequest;
|
|
109
124
|
exports.CreateEmailRequest = CreateEmailRequest;
|
|
110
125
|
exports.CreateEmailRequestAddress = CreateEmailRequestAddress;
|
|
111
126
|
exports.CreateEmailRequestAttachment = CreateEmailRequestAttachment;
|
|
112
127
|
exports.CreateEmailRequestHeader = CreateEmailRequestHeader;
|
|
113
128
|
exports.CreateWebhookRequest = CreateWebhookRequest;
|
|
129
|
+
exports.ListBlocklistsRequest = ListBlocklistsRequest;
|
|
114
130
|
exports.ListDomainsRequest = ListDomainsRequest;
|
|
115
131
|
exports.ListEmailsRequest = ListEmailsRequest;
|
|
116
132
|
exports.ListWebhookEventsRequest = ListWebhookEventsRequest;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export declare const BulkCreateBlocklistsRequest: {
|
|
2
|
+
reason: {
|
|
3
|
+
maxLength: number;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
1
6
|
export declare const CreateDomainRequest: {
|
|
2
7
|
domainName: {
|
|
3
8
|
maxLength: number;
|
|
@@ -40,6 +45,15 @@ export declare const CreateWebhookRequest: {
|
|
|
40
45
|
minLength: number;
|
|
41
46
|
};
|
|
42
47
|
};
|
|
48
|
+
export declare const ListBlocklistsRequest: {
|
|
49
|
+
page: {
|
|
50
|
+
greaterThan: number;
|
|
51
|
+
};
|
|
52
|
+
pageSize: {
|
|
53
|
+
greaterThanOrEqual: number;
|
|
54
|
+
lessThanOrEqual: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
43
57
|
export declare const ListDomainsRequest: {
|
|
44
58
|
page: {
|
|
45
59
|
greaterThan: number;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const BulkCreateBlocklistsRequest = {
|
|
2
|
+
reason: {
|
|
3
|
+
maxLength: 200
|
|
4
|
+
}
|
|
5
|
+
};
|
|
1
6
|
const CreateDomainRequest = {
|
|
2
7
|
domainName: {
|
|
3
8
|
maxLength: 255,
|
|
@@ -40,6 +45,15 @@ const CreateWebhookRequest = {
|
|
|
40
45
|
minLength: 3
|
|
41
46
|
}
|
|
42
47
|
};
|
|
48
|
+
const ListBlocklistsRequest = {
|
|
49
|
+
page: {
|
|
50
|
+
greaterThan: 0
|
|
51
|
+
},
|
|
52
|
+
pageSize: {
|
|
53
|
+
greaterThanOrEqual: 1,
|
|
54
|
+
lessThanOrEqual: 100
|
|
55
|
+
}
|
|
56
|
+
};
|
|
43
57
|
const ListDomainsRequest = {
|
|
44
58
|
page: {
|
|
45
59
|
greaterThan: 0
|
|
@@ -104,12 +118,14 @@ const UpdateWebhookRequest = {
|
|
|
104
118
|
}
|
|
105
119
|
};
|
|
106
120
|
export {
|
|
121
|
+
BulkCreateBlocklistsRequest,
|
|
107
122
|
CreateDomainRequest,
|
|
108
123
|
CreateEmailRequest,
|
|
109
124
|
CreateEmailRequestAddress,
|
|
110
125
|
CreateEmailRequestAttachment,
|
|
111
126
|
CreateEmailRequestHeader,
|
|
112
127
|
CreateWebhookRequest,
|
|
128
|
+
ListBlocklistsRequest,
|
|
113
129
|
ListDomainsRequest,
|
|
114
130
|
ListEmailsRequest,
|
|
115
131
|
ListWebhookEventsRequest,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
2
|
-
export * from './content.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export * from './content.gen.js';
|
|
3
3
|
export type { CreateHumanRequest, DeleteHumanRequest, EyeColors, GetHumanRequest, Human, HumanStatus, ListHumansRequest, ListHumansRequestOrderBy, ListHumansResponse, RegisterRequest, RegisterResponse, RunHumanRequest, SmokeHumanRequest, UpdateHumanRequest, } from './types.gen';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
2
|
export type { CreatePrivateNetworkRequest, DeletePrivateNetworkRequest, GetPrivateNetworkRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, PrivateNetwork, UpdatePrivateNetworkRequest, } from './types.gen';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
2
|
export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC, } from './types.gen';
|
|
3
|
-
export * as ValidationRules from './validation-rules.gen';
|
|
3
|
+
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
2
|
-
export * from './content.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export * from './content.gen.js';
|
|
3
3
|
export type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayNetworkRequestIpamConfig, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DHCPEntryType, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, IpamConfig, ListDHCPEntriesRequest, ListDHCPEntriesRequestOrderBy, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsRequestOrderBy, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPATRulesRequest, ListPATRulesRequestOrderBy, ListPATRulesResponse, PATRule, PATRuleProtocol, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesRequestEntry, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesRequestRule, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayNetworkRequestIpamConfig, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest, } from './types.gen';
|
|
@@ -514,5 +514,52 @@ class API extends api.API {
|
|
|
514
514
|
},
|
|
515
515
|
marshalling_gen.unmarshalGateway
|
|
516
516
|
);
|
|
517
|
+
/**
|
|
518
|
+
* Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
|
|
519
|
+
* be allowed to connect to the SSH bastion.
|
|
520
|
+
*
|
|
521
|
+
* @param request - The request {@link AddBastionAllowedIPsRequest}
|
|
522
|
+
* @returns A Promise of AddBastionAllowedIPsResponse
|
|
523
|
+
*/
|
|
524
|
+
addBastionAllowedIPs = (request) => this.client.fetch(
|
|
525
|
+
{
|
|
526
|
+
body: JSON.stringify(
|
|
527
|
+
marshalling_gen.marshalAddBastionAllowedIPsRequest(request, this.client.settings)
|
|
528
|
+
),
|
|
529
|
+
headers: jsonContentHeaders,
|
|
530
|
+
method: "POST",
|
|
531
|
+
path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
532
|
+
},
|
|
533
|
+
marshalling_gen.unmarshalAddBastionAllowedIPsResponse
|
|
534
|
+
);
|
|
535
|
+
/**
|
|
536
|
+
* Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
|
|
537
|
+
* ranges (in CIDR notation) allowed to connect to the SSH bastion.
|
|
538
|
+
*
|
|
539
|
+
* @param request - The request {@link SetBastionAllowedIPsRequest}
|
|
540
|
+
* @returns A Promise of SetBastionAllowedIPsResponse
|
|
541
|
+
*/
|
|
542
|
+
setBastionAllowedIPs = (request) => this.client.fetch(
|
|
543
|
+
{
|
|
544
|
+
body: JSON.stringify(
|
|
545
|
+
marshalling_gen.marshalSetBastionAllowedIPsRequest(request, this.client.settings)
|
|
546
|
+
),
|
|
547
|
+
headers: jsonContentHeaders,
|
|
548
|
+
method: "PUT",
|
|
549
|
+
path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
550
|
+
},
|
|
551
|
+
marshalling_gen.unmarshalSetBastionAllowedIPsResponse
|
|
552
|
+
);
|
|
553
|
+
/**
|
|
554
|
+
* Delete allowed IP range from SSH bastion. Delete an IP range (defined in
|
|
555
|
+
* CIDR notation) from SSH bastion, so that it is no longer allowed to
|
|
556
|
+
* connect.
|
|
557
|
+
*
|
|
558
|
+
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
559
|
+
*/
|
|
560
|
+
deleteBastionAllowedIPs = (request) => this.client.fetch({
|
|
561
|
+
method: "DELETE",
|
|
562
|
+
path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips/${marshalling.validatePathParam("ipRange", request.ipRange)}`
|
|
563
|
+
});
|
|
517
564
|
}
|
|
518
565
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { WaitForOptions, Zone } from '../../../bridge';
|
|
3
|
-
import type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPatRulesRequest, ListPatRulesResponse, PatRule, RefreshSSHKeysRequest, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
3
|
+
import type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPatRulesRequest, ListPatRulesResponse, PatRule, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Public Gateways API.
|
|
6
6
|
*
|
|
@@ -264,4 +264,28 @@ export declare class API extends ParentAPI {
|
|
|
264
264
|
* @returns A Promise of Gateway
|
|
265
265
|
*/
|
|
266
266
|
refreshSSHKeys: (request: Readonly<RefreshSSHKeysRequest>) => Promise<Gateway>;
|
|
267
|
+
/**
|
|
268
|
+
* Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
|
|
269
|
+
* be allowed to connect to the SSH bastion.
|
|
270
|
+
*
|
|
271
|
+
* @param request - The request {@link AddBastionAllowedIPsRequest}
|
|
272
|
+
* @returns A Promise of AddBastionAllowedIPsResponse
|
|
273
|
+
*/
|
|
274
|
+
addBastionAllowedIPs: (request: Readonly<AddBastionAllowedIPsRequest>) => Promise<AddBastionAllowedIPsResponse>;
|
|
275
|
+
/**
|
|
276
|
+
* Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
|
|
277
|
+
* ranges (in CIDR notation) allowed to connect to the SSH bastion.
|
|
278
|
+
*
|
|
279
|
+
* @param request - The request {@link SetBastionAllowedIPsRequest}
|
|
280
|
+
* @returns A Promise of SetBastionAllowedIPsResponse
|
|
281
|
+
*/
|
|
282
|
+
setBastionAllowedIPs: (request: Readonly<SetBastionAllowedIPsRequest>) => Promise<SetBastionAllowedIPsResponse>;
|
|
283
|
+
/**
|
|
284
|
+
* Delete allowed IP range from SSH bastion. Delete an IP range (defined in
|
|
285
|
+
* CIDR notation) from SSH bastion, so that it is no longer allowed to
|
|
286
|
+
* connect.
|
|
287
|
+
*
|
|
288
|
+
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
289
|
+
*/
|
|
290
|
+
deleteBastionAllowedIPs: (request: Readonly<DeleteBastionAllowedIPsRequest>) => Promise<void>;
|
|
267
291
|
}
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } from "./marshalling.gen.js";
|
|
7
|
+
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest, marshalAddBastionAllowedIPsRequest, unmarshalAddBastionAllowedIPsResponse, marshalSetBastionAllowedIPsRequest, unmarshalSetBastionAllowedIPsResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -512,6 +512,53 @@ class API extends API$1 {
|
|
|
512
512
|
},
|
|
513
513
|
unmarshalGateway
|
|
514
514
|
);
|
|
515
|
+
/**
|
|
516
|
+
* Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
|
|
517
|
+
* be allowed to connect to the SSH bastion.
|
|
518
|
+
*
|
|
519
|
+
* @param request - The request {@link AddBastionAllowedIPsRequest}
|
|
520
|
+
* @returns A Promise of AddBastionAllowedIPsResponse
|
|
521
|
+
*/
|
|
522
|
+
addBastionAllowedIPs = (request) => this.client.fetch(
|
|
523
|
+
{
|
|
524
|
+
body: JSON.stringify(
|
|
525
|
+
marshalAddBastionAllowedIPsRequest(request, this.client.settings)
|
|
526
|
+
),
|
|
527
|
+
headers: jsonContentHeaders,
|
|
528
|
+
method: "POST",
|
|
529
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
530
|
+
},
|
|
531
|
+
unmarshalAddBastionAllowedIPsResponse
|
|
532
|
+
);
|
|
533
|
+
/**
|
|
534
|
+
* Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
|
|
535
|
+
* ranges (in CIDR notation) allowed to connect to the SSH bastion.
|
|
536
|
+
*
|
|
537
|
+
* @param request - The request {@link SetBastionAllowedIPsRequest}
|
|
538
|
+
* @returns A Promise of SetBastionAllowedIPsResponse
|
|
539
|
+
*/
|
|
540
|
+
setBastionAllowedIPs = (request) => this.client.fetch(
|
|
541
|
+
{
|
|
542
|
+
body: JSON.stringify(
|
|
543
|
+
marshalSetBastionAllowedIPsRequest(request, this.client.settings)
|
|
544
|
+
),
|
|
545
|
+
headers: jsonContentHeaders,
|
|
546
|
+
method: "PUT",
|
|
547
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
548
|
+
},
|
|
549
|
+
unmarshalSetBastionAllowedIPsResponse
|
|
550
|
+
);
|
|
551
|
+
/**
|
|
552
|
+
* Delete allowed IP range from SSH bastion. Delete an IP range (defined in
|
|
553
|
+
* CIDR notation) from SSH bastion, so that it is no longer allowed to
|
|
554
|
+
* connect.
|
|
555
|
+
*
|
|
556
|
+
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
557
|
+
*/
|
|
558
|
+
deleteBastionAllowedIPs = (request) => this.client.fetch({
|
|
559
|
+
method: "DELETE",
|
|
560
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips/${validatePathParam("ipRange", request.ipRange)}`
|
|
561
|
+
});
|
|
515
562
|
}
|
|
516
563
|
export {
|
|
517
564
|
API
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
2
|
-
export * from './content.gen';
|
|
3
|
-
export type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export * from './content.gen.js';
|
|
3
|
+
export type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen';
|
|
@@ -51,6 +51,7 @@ const unmarshalGateway = (data) => {
|
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
53
|
bandwidth: data.bandwidth,
|
|
54
|
+
bastionAllowedIps: data.bastion_allowed_ips,
|
|
54
55
|
bastionEnabled: data.bastion_enabled,
|
|
55
56
|
bastionPort: data.bastion_port,
|
|
56
57
|
canUpgradeTo: data.can_upgrade_to,
|
|
@@ -92,6 +93,16 @@ const unmarshalPatRule = (data) => {
|
|
|
92
93
|
zone: data.zone
|
|
93
94
|
};
|
|
94
95
|
};
|
|
96
|
+
const unmarshalAddBastionAllowedIPsResponse = (data) => {
|
|
97
|
+
if (!json.isJSONObject(data)) {
|
|
98
|
+
throw new TypeError(
|
|
99
|
+
`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
ipRanges: data.ip_ranges
|
|
104
|
+
};
|
|
105
|
+
};
|
|
95
106
|
const unmarshalListGatewayNetworksResponse = (data) => {
|
|
96
107
|
if (!json.isJSONObject(data)) {
|
|
97
108
|
throw new TypeError(
|
|
@@ -161,6 +172,16 @@ const unmarshalListPatRulesResponse = (data) => {
|
|
|
161
172
|
totalCount: data.total_count
|
|
162
173
|
};
|
|
163
174
|
};
|
|
175
|
+
const unmarshalSetBastionAllowedIPsResponse = (data) => {
|
|
176
|
+
if (!json.isJSONObject(data)) {
|
|
177
|
+
throw new TypeError(
|
|
178
|
+
`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
ipRanges: data.ip_ranges
|
|
183
|
+
};
|
|
184
|
+
};
|
|
164
185
|
const unmarshalSetPatRulesResponse = (data) => {
|
|
165
186
|
if (!json.isJSONObject(data)) {
|
|
166
187
|
throw new TypeError(
|
|
@@ -171,6 +192,9 @@ const unmarshalSetPatRulesResponse = (data) => {
|
|
|
171
192
|
patRules: marshalling.unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
|
|
172
193
|
};
|
|
173
194
|
};
|
|
195
|
+
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
|
|
196
|
+
ip_range: request.ipRange
|
|
197
|
+
});
|
|
174
198
|
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
175
199
|
enable_masquerade: request.enableMasquerade,
|
|
176
200
|
gateway_id: request.gatewayId,
|
|
@@ -199,6 +223,9 @@ const marshalCreatePatRuleRequest = (request, defaults) => ({
|
|
|
199
223
|
protocol: request.protocol,
|
|
200
224
|
public_port: request.publicPort
|
|
201
225
|
});
|
|
226
|
+
const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
|
|
227
|
+
ip_ranges: request.ipRanges
|
|
228
|
+
});
|
|
202
229
|
const marshalSetPatRulesRequestRule = (request, defaults) => ({
|
|
203
230
|
private_ip: request.privateIp,
|
|
204
231
|
private_port: request.privatePort,
|
|
@@ -237,16 +264,19 @@ const marshalUpdatePatRuleRequest = (request, defaults) => ({
|
|
|
237
264
|
const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
238
265
|
type: request.type
|
|
239
266
|
});
|
|
267
|
+
exports.marshalAddBastionAllowedIPsRequest = marshalAddBastionAllowedIPsRequest;
|
|
240
268
|
exports.marshalCreateGatewayNetworkRequest = marshalCreateGatewayNetworkRequest;
|
|
241
269
|
exports.marshalCreateGatewayRequest = marshalCreateGatewayRequest;
|
|
242
270
|
exports.marshalCreateIPRequest = marshalCreateIPRequest;
|
|
243
271
|
exports.marshalCreatePatRuleRequest = marshalCreatePatRuleRequest;
|
|
272
|
+
exports.marshalSetBastionAllowedIPsRequest = marshalSetBastionAllowedIPsRequest;
|
|
244
273
|
exports.marshalSetPatRulesRequest = marshalSetPatRulesRequest;
|
|
245
274
|
exports.marshalUpdateGatewayNetworkRequest = marshalUpdateGatewayNetworkRequest;
|
|
246
275
|
exports.marshalUpdateGatewayRequest = marshalUpdateGatewayRequest;
|
|
247
276
|
exports.marshalUpdateIPRequest = marshalUpdateIPRequest;
|
|
248
277
|
exports.marshalUpdatePatRuleRequest = marshalUpdatePatRuleRequest;
|
|
249
278
|
exports.marshalUpgradeGatewayRequest = marshalUpgradeGatewayRequest;
|
|
279
|
+
exports.unmarshalAddBastionAllowedIPsResponse = unmarshalAddBastionAllowedIPsResponse;
|
|
250
280
|
exports.unmarshalGateway = unmarshalGateway;
|
|
251
281
|
exports.unmarshalGatewayNetwork = unmarshalGatewayNetwork;
|
|
252
282
|
exports.unmarshalIP = unmarshalIP;
|
|
@@ -256,4 +286,5 @@ exports.unmarshalListGatewaysResponse = unmarshalListGatewaysResponse;
|
|
|
256
286
|
exports.unmarshalListIPsResponse = unmarshalListIPsResponse;
|
|
257
287
|
exports.unmarshalListPatRulesResponse = unmarshalListPatRulesResponse;
|
|
258
288
|
exports.unmarshalPatRule = unmarshalPatRule;
|
|
289
|
+
exports.unmarshalSetBastionAllowedIPsResponse = unmarshalSetBastionAllowedIPsResponse;
|
|
259
290
|
exports.unmarshalSetPatRulesResponse = unmarshalSetPatRulesResponse;
|