@scaleway/sdk-mailbox 1.4.1 → 1.5.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/v1alpha1/api.gen.d.ts +22 -4
- package/dist/v1alpha1/api.gen.js +7 -1
- package/dist/v1alpha1/content.gen.d.ts +3 -1
- package/dist/v1alpha1/content.gen.js +3 -1
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +6 -3
- package/dist/v1alpha1/marshalling.gen.d.ts +3 -1
- package/dist/v1alpha1/marshalling.gen.js +17 -3
- package/dist/v1alpha1/metadata.gen.d.ts +38 -38
- package/dist/v1alpha1/types.gen.d.ts +48 -8
- package/dist/v1alpha1/validation-rules.gen.d.ts +9 -0
- package/dist/v1alpha1/validation-rules.gen.js +9 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { WaitForOptions } from '@scaleway/sdk-client';
|
|
2
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
-
import type {
|
|
2
|
+
import type { WaitForOptions } from '@scaleway/sdk-client';
|
|
3
|
+
import type { Alias, BatchCreateMailboxesRequest, BatchCreateMailboxesResponse, CreateAliasRequest, CreateDomainRequest, DeleteDomainRequest, DeleteMailboxRequest, Domain, GetDomainRecordsRequest, GetDomainRecordsResponse, GetDomainRequest, GetMailboxRequest, ListDomainsRequest, ListDomainsResponse, ListMailboxesRequest, ListMailboxesResponse, Mailbox, RestoreMailboxRequest, UpdateMailboxRequest, ValidateDomainRecordsRequest } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Mailbox API.
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ export declare class API extends ParentAPI {
|
|
|
39
39
|
* @param options - The waiting options
|
|
40
40
|
* @returns A Promise of Domain
|
|
41
41
|
*/
|
|
42
|
-
waitForDomain: (request: Readonly<GetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>
|
|
42
|
+
waitForDomain: (request: Readonly<GetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>) => Promise<Domain>;
|
|
43
43
|
/**
|
|
44
44
|
* Delete a domain by its ID.. Delete a domain by its ID.
|
|
45
45
|
*
|
|
@@ -54,7 +54,18 @@ export declare class API extends ParentAPI {
|
|
|
54
54
|
* @returns A Promise of GetDomainRecordsResponse
|
|
55
55
|
*/
|
|
56
56
|
getDomainRecords: (request: Readonly<GetDomainRecordsRequest>) => Promise<GetDomainRecordsResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Validate domain records by its ID.. Validate domain records by its ID.
|
|
59
|
+
*
|
|
60
|
+
* @param request - The request {@link ValidateDomainRecordsRequest}
|
|
61
|
+
*/
|
|
57
62
|
validateDomainRecords: (request: Readonly<ValidateDomainRecordsRequest>) => Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Create one or more mailboxes.. Create one or more mailboxes.
|
|
65
|
+
*
|
|
66
|
+
* @param request - The request {@link BatchCreateMailboxesRequest}
|
|
67
|
+
* @returns A Promise of BatchCreateMailboxesResponse
|
|
68
|
+
*/
|
|
58
69
|
batchCreateMailboxes: (request: Readonly<BatchCreateMailboxesRequest>) => Promise<BatchCreateMailboxesResponse>;
|
|
59
70
|
protected pageOfListMailboxes: (request?: Readonly<ListMailboxesRequest>) => Promise<ListMailboxesResponse>;
|
|
60
71
|
/**
|
|
@@ -81,7 +92,7 @@ export declare class API extends ParentAPI {
|
|
|
81
92
|
* @param options - The waiting options
|
|
82
93
|
* @returns A Promise of Mailbox
|
|
83
94
|
*/
|
|
84
|
-
waitForMailbox: (request: Readonly<GetMailboxRequest>, options?: Readonly<WaitForOptions<Mailbox>>
|
|
95
|
+
waitForMailbox: (request: Readonly<GetMailboxRequest>, options?: Readonly<WaitForOptions<Mailbox>>) => Promise<Mailbox>;
|
|
85
96
|
/**
|
|
86
97
|
* Update a mailbox subscription period or password with its ID.. Update a mailbox subscription period or password with its ID.
|
|
87
98
|
*
|
|
@@ -103,4 +114,11 @@ export declare class API extends ParentAPI {
|
|
|
103
114
|
* @returns A Promise of Mailbox
|
|
104
115
|
*/
|
|
105
116
|
restoreMailbox: (request: Readonly<RestoreMailboxRequest>) => Promise<Mailbox>;
|
|
117
|
+
/**
|
|
118
|
+
* Create an alias for a mailbox.. Create an alias for a mailbox.
|
|
119
|
+
*
|
|
120
|
+
* @param request - The request {@link CreateAliasRequest}
|
|
121
|
+
* @returns A Promise of Alias
|
|
122
|
+
*/
|
|
123
|
+
createAlias: (request: Readonly<CreateAliasRequest>) => Promise<Alias>;
|
|
106
124
|
}
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
-
import { marshalBatchCreateMailboxesRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox } from "./marshalling.gen.js";
|
|
2
|
+
import { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1alpha1/api.gen.ts
|
|
5
5
|
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
@@ -75,6 +75,12 @@ var API = class extends API$1 {
|
|
|
75
75
|
method: "POST",
|
|
76
76
|
path: `/mailbox/v1alpha1/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}/restore`
|
|
77
77
|
}, unmarshalMailbox);
|
|
78
|
+
this.createAlias = (request) => this.client.fetch({
|
|
79
|
+
body: JSON.stringify(marshalCreateAliasRequest(request, this.client.settings)),
|
|
80
|
+
headers: jsonContentHeaders,
|
|
81
|
+
method: "POST",
|
|
82
|
+
path: `/mailbox/v1alpha1/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}/aliases`
|
|
83
|
+
}, unmarshalAlias);
|
|
78
84
|
}
|
|
79
85
|
};
|
|
80
86
|
//#endregion
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { DomainRecordStatus, DomainStatus, MailboxStatus } from './types.gen.js';
|
|
1
|
+
import type { AliasStatus, DomainRecordStatus, DomainStatus, MailboxStatus } from './types.gen.js';
|
|
2
|
+
/** Lists transient statutes of the enum {@link AliasStatus}. */
|
|
3
|
+
export declare const ALIAS_TRANSIENT_STATUSES: AliasStatus[];
|
|
2
4
|
/** Lists transient statutes of the enum {@link DomainRecordStatus}. */
|
|
3
5
|
export declare const DOMAIN_RECORD_TRANSIENT_STATUSES: DomainRecordStatus[];
|
|
4
6
|
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
//#region src/v1alpha1/content.gen.ts
|
|
2
|
+
/** Lists transient statutes of the enum {@link AliasStatus}. */
|
|
3
|
+
const ALIAS_TRANSIENT_STATUSES = ["provisioning", "deleting"];
|
|
2
4
|
/** Lists transient statutes of the enum {@link DomainRecordStatus}. */
|
|
3
5
|
const DOMAIN_RECORD_TRANSIENT_STATUSES = ["validating"];
|
|
4
6
|
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
@@ -18,4 +20,4 @@ const MAILBOX_TRANSIENT_STATUSES = [
|
|
|
18
20
|
"restoring"
|
|
19
21
|
];
|
|
20
22
|
//#endregion
|
|
21
|
-
export { DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES };
|
|
23
|
+
export { ALIAS_TRANSIENT_STATUSES, DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { API, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
|
-
export type { BatchCreateMailboxesRequest, BatchCreateMailboxesRequestMailboxParameters, BatchCreateMailboxesResponse, CreateDomainRequest, DeleteDomainRequest, DeleteMailboxRequest, Domain, DomainRecord, DomainRecordDNSType, DomainRecordLevel, DomainRecordStatus, DomainStatus, GetDomainRecordsRequest, GetDomainRecordsResponse, GetDomainRequest, GetMailboxRequest, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListMailboxesRequest, ListMailboxesRequestOrderBy, ListMailboxesResponse, Mailbox, MailboxStatus, MailboxSubscriptionPeriod, RestoreMailboxRequest, UpdateMailboxRequest, ValidateDomainRecordsRequest, } from './types.gen.js';
|
|
4
|
+
export type { Alias, AliasStatus, BatchCreateMailboxesRequest, BatchCreateMailboxesRequestMailboxParameters, BatchCreateMailboxesResponse, CreateAliasRequest, CreateDomainRequest, DeleteDomainRequest, DeleteMailboxRequest, Domain, DomainRecord, DomainRecordDNSType, DomainRecordLevel, DomainRecordStatus, DomainStatus, GetDomainRecordsRequest, GetDomainRecordsResponse, GetDomainRequest, GetMailboxRequest, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListMailboxesRequest, ListMailboxesRequestOrderBy, ListMailboxesResponse, Mailbox, MailboxStatus, MailboxSubscriptionPeriod, RestoreMailboxRequest, UpdateMailboxRequest, ValidateDomainRecordsRequest, } from './types.gen.js';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalBatchCreateMailboxesRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox } from "./marshalling.gen.js";
|
|
2
|
+
import { ALIAS_TRANSIENT_STATUSES, DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
+
import { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
6
|
//#region src/v1alpha1/index.gen.ts
|
|
7
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
ALIAS_TRANSIENT_STATUSES: () => ALIAS_TRANSIENT_STATUSES,
|
|
8
9
|
API: () => API,
|
|
9
10
|
DOMAIN_RECORD_TRANSIENT_STATUSES: () => DOMAIN_RECORD_TRANSIENT_STATUSES,
|
|
10
11
|
DOMAIN_TRANSIENT_STATUSES: () => DOMAIN_TRANSIENT_STATUSES,
|
|
11
12
|
MAILBOX_TRANSIENT_STATUSES: () => MAILBOX_TRANSIENT_STATUSES,
|
|
12
13
|
ValidationRules: () => validation_rules_gen_exports,
|
|
13
14
|
marshalBatchCreateMailboxesRequest: () => marshalBatchCreateMailboxesRequest,
|
|
15
|
+
marshalCreateAliasRequest: () => marshalCreateAliasRequest,
|
|
14
16
|
marshalCreateDomainRequest: () => marshalCreateDomainRequest,
|
|
15
17
|
marshalUpdateMailboxRequest: () => marshalUpdateMailboxRequest,
|
|
18
|
+
unmarshalAlias: () => unmarshalAlias,
|
|
16
19
|
unmarshalBatchCreateMailboxesResponse: () => unmarshalBatchCreateMailboxesResponse,
|
|
17
20
|
unmarshalDomain: () => unmarshalDomain,
|
|
18
21
|
unmarshalGetDomainRecordsResponse: () => unmarshalGetDomainRecordsResponse,
|
|
@@ -21,4 +24,4 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
21
24
|
unmarshalMailbox: () => unmarshalMailbox
|
|
22
25
|
});
|
|
23
26
|
//#endregion
|
|
24
|
-
export { API, DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalBatchCreateMailboxesRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
27
|
+
export { ALIAS_TRANSIENT_STATUSES, API, DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Mailbox, Domain, Alias, BatchCreateMailboxesResponse, GetDomainRecordsResponse, ListDomainsResponse, ListMailboxesResponse, BatchCreateMailboxesRequest, CreateAliasRequest, CreateDomainRequest, UpdateMailboxRequest } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalMailbox: (data: unknown) => Mailbox;
|
|
4
4
|
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
5
|
+
export declare const unmarshalAlias: (data: unknown) => Alias;
|
|
5
6
|
export declare const unmarshalBatchCreateMailboxesResponse: (data: unknown) => BatchCreateMailboxesResponse;
|
|
6
7
|
export declare const unmarshalGetDomainRecordsResponse: (data: unknown) => GetDomainRecordsResponse;
|
|
7
8
|
export declare const unmarshalListDomainsResponse: (data: unknown) => ListDomainsResponse;
|
|
8
9
|
export declare const unmarshalListMailboxesResponse: (data: unknown) => ListMailboxesResponse;
|
|
9
10
|
export declare const marshalBatchCreateMailboxesRequest: (request: BatchCreateMailboxesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
11
|
+
export declare const marshalCreateAliasRequest: (request: CreateAliasRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
10
12
|
export declare const marshalCreateDomainRequest: (request: CreateDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
11
13
|
export declare const marshalUpdateMailboxRequest: (request: UpdateMailboxRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -22,7 +22,6 @@ const unmarshalDomain = (data) => {
|
|
|
22
22
|
createdAt: unmarshalDate(data.created_at),
|
|
23
23
|
id: data.id,
|
|
24
24
|
imapUrl: data.imap_url,
|
|
25
|
-
jmapUrl: data.jmap_url,
|
|
26
25
|
mailboxTotalCount: data.mailbox_total_count,
|
|
27
26
|
name: data.name,
|
|
28
27
|
pop3Url: data.pop3_url,
|
|
@@ -33,6 +32,18 @@ const unmarshalDomain = (data) => {
|
|
|
33
32
|
webmailUrl: data.webmail_url
|
|
34
33
|
};
|
|
35
34
|
};
|
|
35
|
+
const unmarshalAlias = (data) => {
|
|
36
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Alias' failed as data isn't a dictionary.`);
|
|
37
|
+
return {
|
|
38
|
+
createdAt: unmarshalDate(data.created_at),
|
|
39
|
+
description: data.description,
|
|
40
|
+
email: data.email,
|
|
41
|
+
id: data.id,
|
|
42
|
+
mailboxId: data.mailbox_id,
|
|
43
|
+
status: data.status,
|
|
44
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
45
|
+
};
|
|
46
|
+
};
|
|
36
47
|
const unmarshalBatchCreateMailboxesResponse = (data) => {
|
|
37
48
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BatchCreateMailboxesResponse' failed as data isn't a dictionary.`);
|
|
38
49
|
return { mailboxes: unmarshalArrayOfObject(data.mailboxes, unmarshalMailbox) };
|
|
@@ -63,7 +74,6 @@ const unmarshalGetDomainRecordsResponse = (data) => {
|
|
|
63
74
|
dmarc: data.dmarc ? unmarshalDomainRecord(data.dmarc) : void 0,
|
|
64
75
|
domainValidation: data.domain_validation ? unmarshalDomainRecord(data.domain_validation) : void 0,
|
|
65
76
|
imap: data.imap ? unmarshalDomainRecord(data.imap) : void 0,
|
|
66
|
-
jmap: data.jmap ? unmarshalDomainRecord(data.jmap) : void 0,
|
|
67
77
|
mx: data.mx ? unmarshalDomainRecord(data.mx) : void 0,
|
|
68
78
|
pop3: data.pop3 ? unmarshalDomainRecord(data.pop3) : void 0,
|
|
69
79
|
spf: data.spf ? unmarshalDomainRecord(data.spf) : void 0,
|
|
@@ -93,6 +103,10 @@ const marshalBatchCreateMailboxesRequest = (request, defaults) => ({
|
|
|
93
103
|
mailboxes: request.mailboxes !== void 0 ? request.mailboxes.map((elt) => marshalBatchCreateMailboxesRequestMailboxParameters(elt, defaults)) : void 0,
|
|
94
104
|
subscription_period: request.subscriptionPeriod
|
|
95
105
|
});
|
|
106
|
+
const marshalCreateAliasRequest = (request, defaults) => ({
|
|
107
|
+
description: request.description,
|
|
108
|
+
local_part: request.localPart
|
|
109
|
+
});
|
|
96
110
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
97
111
|
name: request.name,
|
|
98
112
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
@@ -102,4 +116,4 @@ const marshalUpdateMailboxRequest = (request, defaults) => ({
|
|
|
102
116
|
subscription_period: request.subscriptionPeriod
|
|
103
117
|
});
|
|
104
118
|
//#endregion
|
|
105
|
-
export { marshalBatchCreateMailboxesRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
119
|
+
export { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
export declare const queriesMetadata: {
|
|
2
|
-
readonly namespace:
|
|
3
|
-
readonly version:
|
|
4
|
-
readonly folderName:
|
|
2
|
+
readonly namespace: 'mailbox';
|
|
3
|
+
readonly version: 'v1alpha1';
|
|
4
|
+
readonly folderName: 'mailboxv1alpha1';
|
|
5
5
|
readonly services: readonly [{
|
|
6
|
-
readonly apiClass:
|
|
6
|
+
readonly apiClass: 'API';
|
|
7
7
|
readonly methods: readonly [{
|
|
8
|
-
readonly methodName:
|
|
9
|
-
readonly protoName:
|
|
10
|
-
readonly paramsType:
|
|
11
|
-
readonly returnType:
|
|
8
|
+
readonly methodName: 'listDomains';
|
|
9
|
+
readonly protoName: 'ListDomains';
|
|
10
|
+
readonly paramsType: 'ListDomainsRequest';
|
|
11
|
+
readonly returnType: 'ListDomainsResponse';
|
|
12
12
|
readonly isList: true;
|
|
13
|
-
readonly paginationType:
|
|
14
|
-
readonly pageParamKey:
|
|
15
|
-
readonly listItemType:
|
|
13
|
+
readonly paginationType: 'offset';
|
|
14
|
+
readonly pageParamKey: 'page';
|
|
15
|
+
readonly listItemType: 'Domain';
|
|
16
16
|
readonly isPrivate: false;
|
|
17
|
-
readonly description: "
|
|
17
|
+
readonly description: '"';
|
|
18
18
|
}, {
|
|
19
|
-
readonly methodName:
|
|
20
|
-
readonly protoName:
|
|
21
|
-
readonly paramsType:
|
|
22
|
-
readonly returnType:
|
|
19
|
+
readonly methodName: 'getDomain';
|
|
20
|
+
readonly protoName: 'GetDomain';
|
|
21
|
+
readonly paramsType: 'GetDomainRequest';
|
|
22
|
+
readonly returnType: 'Domain';
|
|
23
23
|
readonly isList: false;
|
|
24
|
-
readonly paginationType:
|
|
24
|
+
readonly paginationType: 'none';
|
|
25
25
|
readonly isPrivate: false;
|
|
26
|
-
readonly description: "
|
|
26
|
+
readonly description: '"';
|
|
27
27
|
readonly hasWaiter: true;
|
|
28
28
|
}, {
|
|
29
|
-
readonly methodName:
|
|
30
|
-
readonly protoName:
|
|
31
|
-
readonly paramsType:
|
|
32
|
-
readonly returnType:
|
|
29
|
+
readonly methodName: 'getDomainRecords';
|
|
30
|
+
readonly protoName: 'GetDomainRecords';
|
|
31
|
+
readonly paramsType: 'GetDomainRecordsRequest';
|
|
32
|
+
readonly returnType: 'GetDomainRecordsResponse';
|
|
33
33
|
readonly isList: false;
|
|
34
|
-
readonly paginationType:
|
|
34
|
+
readonly paginationType: 'none';
|
|
35
35
|
readonly isPrivate: false;
|
|
36
|
-
readonly description: "
|
|
36
|
+
readonly description: '"';
|
|
37
37
|
}, {
|
|
38
|
-
readonly methodName:
|
|
39
|
-
readonly protoName:
|
|
40
|
-
readonly paramsType:
|
|
41
|
-
readonly returnType:
|
|
38
|
+
readonly methodName: 'listMailboxes';
|
|
39
|
+
readonly protoName: 'ListMailboxes';
|
|
40
|
+
readonly paramsType: 'ListMailboxesRequest';
|
|
41
|
+
readonly returnType: 'ListMailboxesResponse';
|
|
42
42
|
readonly isList: true;
|
|
43
|
-
readonly paginationType:
|
|
44
|
-
readonly pageParamKey:
|
|
45
|
-
readonly listItemType:
|
|
43
|
+
readonly paginationType: 'offset';
|
|
44
|
+
readonly pageParamKey: 'page';
|
|
45
|
+
readonly listItemType: 'Mailbox';
|
|
46
46
|
readonly isPrivate: false;
|
|
47
|
-
readonly description: "
|
|
47
|
+
readonly description: '"';
|
|
48
48
|
}, {
|
|
49
|
-
readonly methodName:
|
|
50
|
-
readonly protoName:
|
|
51
|
-
readonly paramsType:
|
|
52
|
-
readonly returnType:
|
|
49
|
+
readonly methodName: 'getMailbox';
|
|
50
|
+
readonly protoName: 'GetMailbox';
|
|
51
|
+
readonly paramsType: 'GetMailboxRequest';
|
|
52
|
+
readonly returnType: 'Mailbox';
|
|
53
53
|
readonly isList: false;
|
|
54
|
-
readonly paginationType:
|
|
54
|
+
readonly paginationType: 'none';
|
|
55
55
|
readonly isPrivate: false;
|
|
56
|
-
readonly description: "
|
|
56
|
+
readonly description: '"';
|
|
57
57
|
readonly hasWaiter: true;
|
|
58
58
|
}];
|
|
59
59
|
}];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type AliasStatus = 'unknown_status' | 'provisioning' | 'deleting' | 'ready';
|
|
1
2
|
export type DomainRecordDNSType = 'unknown_dns_type' | 'cname_dns_type' | 'mx_dns_type' | 'srv_dns_type' | 'txt_dns_type';
|
|
2
3
|
export type DomainRecordLevel = 'unknown_level' | 'required' | 'recommended' | 'optional';
|
|
3
4
|
export type DomainRecordStatus = 'unknown_status' | 'validating' | 'valid' | 'invalid' | 'not_found';
|
|
@@ -135,10 +136,6 @@ export interface Domain {
|
|
|
135
136
|
* URL of the domain's IMAP service.
|
|
136
137
|
*/
|
|
137
138
|
imapUrl: string;
|
|
138
|
-
/**
|
|
139
|
-
* URL of the domain's JMAP service.
|
|
140
|
-
*/
|
|
141
|
-
jmapUrl: string;
|
|
142
139
|
/**
|
|
143
140
|
* URL of the domain's POP3 service.
|
|
144
141
|
*/
|
|
@@ -148,6 +145,36 @@ export interface Domain {
|
|
|
148
145
|
*/
|
|
149
146
|
smtpUrl: string;
|
|
150
147
|
}
|
|
148
|
+
export interface Alias {
|
|
149
|
+
/**
|
|
150
|
+
* Unique identifier of the alias.
|
|
151
|
+
*/
|
|
152
|
+
id: string;
|
|
153
|
+
/**
|
|
154
|
+
* Email address of the alias as local_part@domain.
|
|
155
|
+
*/
|
|
156
|
+
email: string;
|
|
157
|
+
/**
|
|
158
|
+
* ID of the mailbox to which the alias belongs.
|
|
159
|
+
*/
|
|
160
|
+
mailboxId: string;
|
|
161
|
+
/**
|
|
162
|
+
* Description of the alias.
|
|
163
|
+
*/
|
|
164
|
+
description: string;
|
|
165
|
+
/**
|
|
166
|
+
* Current status of the alias.
|
|
167
|
+
*/
|
|
168
|
+
status: AliasStatus;
|
|
169
|
+
/**
|
|
170
|
+
* Date and time of alias creation.
|
|
171
|
+
*/
|
|
172
|
+
createdAt?: Date;
|
|
173
|
+
/**
|
|
174
|
+
* Date and time when the alias was last updated.
|
|
175
|
+
*/
|
|
176
|
+
updatedAt?: Date;
|
|
177
|
+
}
|
|
151
178
|
export type BatchCreateMailboxesRequest = {
|
|
152
179
|
/**
|
|
153
180
|
* Parameters for the mailboxes to create.
|
|
@@ -168,6 +195,20 @@ export interface BatchCreateMailboxesResponse {
|
|
|
168
195
|
*/
|
|
169
196
|
mailboxes: Mailbox[];
|
|
170
197
|
}
|
|
198
|
+
export type CreateAliasRequest = {
|
|
199
|
+
/**
|
|
200
|
+
* ID of the mailbox to associate with the alias.
|
|
201
|
+
*/
|
|
202
|
+
mailboxId: string;
|
|
203
|
+
/**
|
|
204
|
+
* Local part of the email address (e.g. local_part@domain.com).
|
|
205
|
+
*/
|
|
206
|
+
localPart: string;
|
|
207
|
+
/**
|
|
208
|
+
* (Optional) Description of the alias.
|
|
209
|
+
*/
|
|
210
|
+
description?: string;
|
|
211
|
+
};
|
|
171
212
|
export type CreateDomainRequest = {
|
|
172
213
|
/**
|
|
173
214
|
* ID of the project to which the domain belongs.
|
|
@@ -229,10 +270,6 @@ export interface GetDomainRecordsResponse {
|
|
|
229
270
|
* Record that allows accessing the mailbox with the IMAP protocol.
|
|
230
271
|
*/
|
|
231
272
|
imap?: DomainRecord;
|
|
232
|
-
/**
|
|
233
|
-
* Record that allows accessing the mailbox with the JMAP protocol.
|
|
234
|
-
*/
|
|
235
|
-
jmap?: DomainRecord;
|
|
236
273
|
/**
|
|
237
274
|
* Record that directs emails to a mail server.
|
|
238
275
|
*/
|
|
@@ -337,5 +374,8 @@ export type UpdateMailboxRequest = {
|
|
|
337
374
|
newPassword?: string;
|
|
338
375
|
};
|
|
339
376
|
export type ValidateDomainRecordsRequest = {
|
|
377
|
+
/**
|
|
378
|
+
* ID of the domain with which to validate the records.
|
|
379
|
+
*/
|
|
340
380
|
domainId: string;
|
|
341
381
|
};
|
|
@@ -8,6 +8,15 @@ export declare const BatchCreateMailboxesRequestMailboxParameters: {
|
|
|
8
8
|
minLength: number;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
+
export declare const CreateAliasRequest: {
|
|
12
|
+
description: {
|
|
13
|
+
maxLength: number;
|
|
14
|
+
};
|
|
15
|
+
localPart: {
|
|
16
|
+
maxLength: number;
|
|
17
|
+
minLength: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
11
20
|
export declare const CreateDomainRequest: {
|
|
12
21
|
name: {
|
|
13
22
|
maxLength: number;
|
|
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
//#region src/v1alpha1/validation-rules.gen.ts
|
|
3
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
4
4
|
BatchCreateMailboxesRequestMailboxParameters: () => BatchCreateMailboxesRequestMailboxParameters,
|
|
5
|
+
CreateAliasRequest: () => CreateAliasRequest,
|
|
5
6
|
CreateDomainRequest: () => CreateDomainRequest,
|
|
6
7
|
ListDomainsRequest: () => ListDomainsRequest,
|
|
7
8
|
ListMailboxesRequest: () => ListMailboxesRequest,
|
|
@@ -17,6 +18,13 @@ const BatchCreateMailboxesRequestMailboxParameters = {
|
|
|
17
18
|
minLength: 12
|
|
18
19
|
}
|
|
19
20
|
};
|
|
21
|
+
const CreateAliasRequest = {
|
|
22
|
+
description: { maxLength: 128 },
|
|
23
|
+
localPart: {
|
|
24
|
+
maxLength: 64,
|
|
25
|
+
minLength: 1
|
|
26
|
+
}
|
|
27
|
+
};
|
|
20
28
|
const CreateDomainRequest = { name: {
|
|
21
29
|
maxLength: 253,
|
|
22
30
|
minLength: 1
|
|
@@ -40,4 +48,4 @@ const UpdateMailboxRequest = { newPassword: {
|
|
|
40
48
|
minLength: 12
|
|
41
49
|
} };
|
|
42
50
|
//#endregion
|
|
43
|
-
export { BatchCreateMailboxesRequestMailboxParameters, CreateDomainRequest, ListDomainsRequest, ListMailboxesRequest, UpdateMailboxRequest, validation_rules_gen_exports };
|
|
51
|
+
export { BatchCreateMailboxesRequestMailboxParameters, CreateAliasRequest, CreateDomainRequest, ListDomainsRequest, ListMailboxesRequest, UpdateMailboxRequest, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-mailbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Scaleway SDK mailbox",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@scaleway/random-name": "5.1.4",
|
|
35
|
-
"@scaleway/sdk-std": "2.4.
|
|
35
|
+
"@scaleway/sdk-std": "2.4.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@repo/configs": "^0.1.1",
|
|
39
|
-
"@scaleway/sdk-client": "^2.
|
|
39
|
+
"@scaleway/sdk-client": "^2.4.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@scaleway/sdk-client": "^2.
|
|
42
|
+
"@scaleway/sdk-client": "^2.4.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": ">=20.
|
|
45
|
+
"node": ">=20.20.2"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"package:check": "pnpm publint",
|