@scaleway/sdk-mailbox 1.5.0 → 1.6.1
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 +34 -1
- package/dist/v1alpha1/api.gen.js +19 -4
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +3 -2
- package/dist/v1alpha1/marshalling.gen.d.ts +3 -2
- package/dist/v1alpha1/marshalling.gen.js +22 -14
- package/dist/v1alpha1/metadata.gen.d.ts +21 -0
- package/dist/v1alpha1/metadata.gen.js +23 -0
- package/dist/v1alpha1/types.gen.d.ts +87 -34
- 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
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
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';
|
|
3
|
+
import type { Alias, BatchCreateMailboxesRequest, BatchCreateMailboxesResponse, CreateAliasRequest, CreateDomainRequest, DeleteAliasRequest, DeleteDomainRequest, DeleteMailboxRequest, Domain, GetAliasRequest, GetDomainRecordsRequest, GetDomainRecordsResponse, GetDomainRequest, GetMailboxRequest, ListAliasesRequest, ListAliasesResponse, ListDomainsRequest, ListDomainsResponse, ListMailboxesRequest, ListMailboxesResponse, Mailbox, RestoreMailboxRequest, UpdateMailboxRequest, ValidateDomainRecordsRequest } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Mailbox API.
|
|
6
6
|
|
|
@@ -121,4 +121,37 @@ export declare class API extends ParentAPI {
|
|
|
121
121
|
* @returns A Promise of Alias
|
|
122
122
|
*/
|
|
123
123
|
createAlias: (request: Readonly<CreateAliasRequest>) => Promise<Alias>;
|
|
124
|
+
protected pageOfListAliases: (request?: Readonly<ListAliasesRequest>) => Promise<ListAliasesResponse>;
|
|
125
|
+
/**
|
|
126
|
+
* List aliases for a mailbox.. List aliases for a mailbox.
|
|
127
|
+
*
|
|
128
|
+
* @param request - The request {@link ListAliasesRequest}
|
|
129
|
+
* @returns A Promise of ListAliasesResponse
|
|
130
|
+
*/
|
|
131
|
+
listAliases: (request?: Readonly<ListAliasesRequest>) => Promise<ListAliasesResponse> & {
|
|
132
|
+
all: () => Promise<Alias[]>;
|
|
133
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Alias[], void, void>;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Get an alias by its ID.. Get an alias by its ID.
|
|
137
|
+
*
|
|
138
|
+
* @param request - The request {@link GetAliasRequest}
|
|
139
|
+
* @returns A Promise of Alias
|
|
140
|
+
*/
|
|
141
|
+
getAlias: (request: Readonly<GetAliasRequest>) => Promise<Alias>;
|
|
142
|
+
/**
|
|
143
|
+
* Waits for {@link Alias} to be in a final state.
|
|
144
|
+
*
|
|
145
|
+
* @param request - The request {@link GetAliasRequest}
|
|
146
|
+
* @param options - The waiting options
|
|
147
|
+
* @returns A Promise of Alias
|
|
148
|
+
*/
|
|
149
|
+
waitForAlias: (request: Readonly<GetAliasRequest>, options?: Readonly<WaitForOptions<Alias>>) => Promise<Alias>;
|
|
150
|
+
/**
|
|
151
|
+
* Delete an alias by its ID.. Delete an alias by its ID.
|
|
152
|
+
*
|
|
153
|
+
* @param request - The request {@link DeleteAliasRequest}
|
|
154
|
+
* @returns A Promise of Alias
|
|
155
|
+
*/
|
|
156
|
+
deleteAlias: (request: Readonly<DeleteAliasRequest>) => Promise<Alias>;
|
|
124
157
|
}
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
-
import { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox } from "./marshalling.gen.js";
|
|
1
|
+
import { ALIAS_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
+
import { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListAliasesResponse, 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" };
|
|
@@ -51,7 +51,7 @@ var API = class extends API$1 {
|
|
|
51
51
|
this.pageOfListMailboxes = (request = {}) => this.client.fetch({
|
|
52
52
|
method: "GET",
|
|
53
53
|
path: `/mailbox/v1alpha1/mailboxes`,
|
|
54
|
-
urlParams: urlParams(["domain_id", request.domainId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["search", request.search], ["statuses", request.statuses])
|
|
54
|
+
urlParams: urlParams(["domain_id", request.domainId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["search", request.search], ["statuses", request.statuses])
|
|
55
55
|
}, unmarshalListMailboxesResponse);
|
|
56
56
|
this.listMailboxes = (request = {}) => enrichForPagination("mailboxes", this.pageOfListMailboxes, request);
|
|
57
57
|
this.getMailbox = (request) => this.client.fetch({
|
|
@@ -79,7 +79,22 @@ var API = class extends API$1 {
|
|
|
79
79
|
body: JSON.stringify(marshalCreateAliasRequest(request, this.client.settings)),
|
|
80
80
|
headers: jsonContentHeaders,
|
|
81
81
|
method: "POST",
|
|
82
|
-
path: `/mailbox/v1alpha1/
|
|
82
|
+
path: `/mailbox/v1alpha1/aliases`
|
|
83
|
+
}, unmarshalAlias);
|
|
84
|
+
this.pageOfListAliases = (request = {}) => this.client.fetch({
|
|
85
|
+
method: "GET",
|
|
86
|
+
path: `/mailbox/v1alpha1/aliases`,
|
|
87
|
+
urlParams: urlParams(["mailbox_id", request.mailboxId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["status", request.status])
|
|
88
|
+
}, unmarshalListAliasesResponse);
|
|
89
|
+
this.listAliases = (request = {}) => enrichForPagination("aliases", this.pageOfListAliases, request);
|
|
90
|
+
this.getAlias = (request) => this.client.fetch({
|
|
91
|
+
method: "GET",
|
|
92
|
+
path: `/mailbox/v1alpha1/aliases/${validatePathParam("aliasId", request.aliasId)}`
|
|
93
|
+
}, unmarshalAlias);
|
|
94
|
+
this.waitForAlias = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!ALIAS_TRANSIENT_STATUSES.includes(res.status))), this.getAlias, request, options);
|
|
95
|
+
this.deleteAlias = (request) => this.client.fetch({
|
|
96
|
+
method: "DELETE",
|
|
97
|
+
path: `/mailbox/v1alpha1/aliases/${validatePathParam("aliasId", request.aliasId)}`
|
|
83
98
|
}, unmarshalAlias);
|
|
84
99
|
}
|
|
85
100
|
};
|
|
@@ -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 { 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';
|
|
4
|
+
export type { Alias, AliasStatus, BatchCreateMailboxesRequest, BatchCreateMailboxesRequestMailboxParameters, BatchCreateMailboxesResponse, CreateAliasRequest, CreateDomainRequest, DeleteAliasRequest, DeleteDomainRequest, DeleteMailboxRequest, Domain, DomainRecord, DomainRecordDNSType, DomainRecordLevel, DomainRecordStatus, DomainStatus, GetAliasRequest, GetDomainRecordsRequest, GetDomainRecordsResponse, GetDomainRequest, GetMailboxRequest, ListAliasesRequest, ListAliasesRequestOrderBy, ListAliasesResponse, 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,6 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
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";
|
|
3
|
+
import { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListAliasesResponse, 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
|
|
@@ -19,9 +19,10 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
19
19
|
unmarshalBatchCreateMailboxesResponse: () => unmarshalBatchCreateMailboxesResponse,
|
|
20
20
|
unmarshalDomain: () => unmarshalDomain,
|
|
21
21
|
unmarshalGetDomainRecordsResponse: () => unmarshalGetDomainRecordsResponse,
|
|
22
|
+
unmarshalListAliasesResponse: () => unmarshalListAliasesResponse,
|
|
22
23
|
unmarshalListDomainsResponse: () => unmarshalListDomainsResponse,
|
|
23
24
|
unmarshalListMailboxesResponse: () => unmarshalListMailboxesResponse,
|
|
24
25
|
unmarshalMailbox: () => unmarshalMailbox
|
|
25
26
|
});
|
|
26
27
|
//#endregion
|
|
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 };
|
|
28
|
+
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, unmarshalListAliasesResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { Mailbox,
|
|
2
|
+
import type { Mailbox, Alias, Domain, BatchCreateMailboxesResponse, GetDomainRecordsResponse, ListAliasesResponse, ListDomainsResponse, ListMailboxesResponse, BatchCreateMailboxesRequest, CreateAliasRequest, CreateDomainRequest, UpdateMailboxRequest } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalMailbox: (data: unknown) => Mailbox;
|
|
4
|
-
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
5
4
|
export declare const unmarshalAlias: (data: unknown) => Alias;
|
|
5
|
+
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
6
6
|
export declare const unmarshalBatchCreateMailboxesResponse: (data: unknown) => BatchCreateMailboxesResponse;
|
|
7
7
|
export declare const unmarshalGetDomainRecordsResponse: (data: unknown) => GetDomainRecordsResponse;
|
|
8
|
+
export declare const unmarshalListAliasesResponse: (data: unknown) => ListAliasesResponse;
|
|
8
9
|
export declare const unmarshalListDomainsResponse: (data: unknown) => ListDomainsResponse;
|
|
9
10
|
export declare const unmarshalListMailboxesResponse: (data: unknown) => ListMailboxesResponse;
|
|
10
11
|
export declare const marshalBatchCreateMailboxesRequest: (request: BatchCreateMailboxesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -16,6 +16,18 @@ const unmarshalMailbox = (data) => {
|
|
|
16
16
|
updatedAt: unmarshalDate(data.updated_at)
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
+
const unmarshalAlias = (data) => {
|
|
20
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Alias' failed as data isn't a dictionary.`);
|
|
21
|
+
return {
|
|
22
|
+
createdAt: unmarshalDate(data.created_at),
|
|
23
|
+
description: data.description,
|
|
24
|
+
email: data.email,
|
|
25
|
+
id: data.id,
|
|
26
|
+
mailboxId: data.mailbox_id,
|
|
27
|
+
status: data.status,
|
|
28
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
29
|
+
};
|
|
30
|
+
};
|
|
19
31
|
const unmarshalDomain = (data) => {
|
|
20
32
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
|
|
21
33
|
return {
|
|
@@ -32,18 +44,6 @@ const unmarshalDomain = (data) => {
|
|
|
32
44
|
webmailUrl: data.webmail_url
|
|
33
45
|
};
|
|
34
46
|
};
|
|
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
|
-
};
|
|
47
47
|
const unmarshalBatchCreateMailboxesResponse = (data) => {
|
|
48
48
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BatchCreateMailboxesResponse' failed as data isn't a dictionary.`);
|
|
49
49
|
return { mailboxes: unmarshalArrayOfObject(data.mailboxes, unmarshalMailbox) };
|
|
@@ -80,6 +80,13 @@ const unmarshalGetDomainRecordsResponse = (data) => {
|
|
|
80
80
|
submission: data.submission ? unmarshalDomainRecord(data.submission) : void 0
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
const unmarshalListAliasesResponse = (data) => {
|
|
84
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAliasesResponse' failed as data isn't a dictionary.`);
|
|
85
|
+
return {
|
|
86
|
+
aliases: unmarshalArrayOfObject(data.aliases, unmarshalAlias),
|
|
87
|
+
totalCount: data.total_count
|
|
88
|
+
};
|
|
89
|
+
};
|
|
83
90
|
const unmarshalListDomainsResponse = (data) => {
|
|
84
91
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
|
|
85
92
|
return {
|
|
@@ -105,7 +112,8 @@ const marshalBatchCreateMailboxesRequest = (request, defaults) => ({
|
|
|
105
112
|
});
|
|
106
113
|
const marshalCreateAliasRequest = (request, defaults) => ({
|
|
107
114
|
description: request.description,
|
|
108
|
-
local_part: request.localPart
|
|
115
|
+
local_part: request.localPart,
|
|
116
|
+
mailbox_id: request.mailboxId
|
|
109
117
|
});
|
|
110
118
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
111
119
|
name: request.name,
|
|
@@ -116,4 +124,4 @@ const marshalUpdateMailboxRequest = (request, defaults) => ({
|
|
|
116
124
|
subscription_period: request.subscriptionPeriod
|
|
117
125
|
});
|
|
118
126
|
//#endregion
|
|
119
|
-
export { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
127
|
+
export { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListAliasesResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
@@ -55,6 +55,27 @@ export declare const queriesMetadata: {
|
|
|
55
55
|
readonly isPrivate: false;
|
|
56
56
|
readonly description: '"';
|
|
57
57
|
readonly hasWaiter: true;
|
|
58
|
+
}, {
|
|
59
|
+
readonly methodName: 'listAliases';
|
|
60
|
+
readonly protoName: 'ListAliases';
|
|
61
|
+
readonly paramsType: 'ListAliasesRequest';
|
|
62
|
+
readonly returnType: 'ListAliasesResponse';
|
|
63
|
+
readonly isList: true;
|
|
64
|
+
readonly paginationType: 'offset';
|
|
65
|
+
readonly pageParamKey: 'page';
|
|
66
|
+
readonly listItemType: 'Alias';
|
|
67
|
+
readonly isPrivate: false;
|
|
68
|
+
readonly description: '"';
|
|
69
|
+
}, {
|
|
70
|
+
readonly methodName: 'getAlias';
|
|
71
|
+
readonly protoName: 'GetAlias';
|
|
72
|
+
readonly paramsType: 'GetAliasRequest';
|
|
73
|
+
readonly returnType: 'Alias';
|
|
74
|
+
readonly isList: false;
|
|
75
|
+
readonly paginationType: 'none';
|
|
76
|
+
readonly isPrivate: false;
|
|
77
|
+
readonly description: '"';
|
|
78
|
+
readonly hasWaiter: true;
|
|
58
79
|
}];
|
|
59
80
|
}];
|
|
60
81
|
};
|
|
@@ -61,6 +61,29 @@ const queriesMetadata = {
|
|
|
61
61
|
isPrivate: false,
|
|
62
62
|
description: "\"",
|
|
63
63
|
hasWaiter: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
methodName: "listAliases",
|
|
67
|
+
protoName: "ListAliases",
|
|
68
|
+
paramsType: "ListAliasesRequest",
|
|
69
|
+
returnType: "ListAliasesResponse",
|
|
70
|
+
isList: true,
|
|
71
|
+
paginationType: "offset",
|
|
72
|
+
pageParamKey: "page",
|
|
73
|
+
listItemType: "Alias",
|
|
74
|
+
isPrivate: false,
|
|
75
|
+
description: "\""
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
methodName: "getAlias",
|
|
79
|
+
protoName: "GetAlias",
|
|
80
|
+
paramsType: "GetAliasRequest",
|
|
81
|
+
returnType: "Alias",
|
|
82
|
+
isList: false,
|
|
83
|
+
paginationType: "none",
|
|
84
|
+
isPrivate: false,
|
|
85
|
+
description: "\"",
|
|
86
|
+
hasWaiter: true
|
|
64
87
|
}
|
|
65
88
|
]
|
|
66
89
|
}]
|
|
@@ -3,6 +3,7 @@ export type DomainRecordDNSType = 'unknown_dns_type' | 'cname_dns_type' | 'mx_dn
|
|
|
3
3
|
export type DomainRecordLevel = 'unknown_level' | 'required' | 'recommended' | 'optional';
|
|
4
4
|
export type DomainRecordStatus = 'unknown_status' | 'validating' | 'valid' | 'invalid' | 'not_found';
|
|
5
5
|
export type DomainStatus = 'unknown_status' | 'creating' | 'waiting_validation' | 'validating' | 'validation_failed' | 'provisioning' | 'ready' | 'deleting';
|
|
6
|
+
export type ListAliasesRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'updated_at_desc' | 'updated_at_asc' | 'name_desc' | 'name_asc';
|
|
6
7
|
export type ListDomainsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'updated_at_desc' | 'updated_at_asc' | 'name_desc' | 'name_asc' | 'mailbox_total_count_desc' | 'mailbox_total_count_asc';
|
|
7
8
|
export type ListMailboxesRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'updated_at_desc' | 'updated_at_asc' | 'email_desc' | 'email_asc';
|
|
8
9
|
export type MailboxStatus = 'unknown_status' | 'creating' | 'waiting_payment' | 'waiting_domain' | 'ready' | 'deletion_scheduled' | 'locked' | 'renewing' | 'deleting' | 'restoring' | 'payment_failed';
|
|
@@ -99,6 +100,36 @@ export interface DomainRecord {
|
|
|
99
100
|
*/
|
|
100
101
|
updatedAt?: Date;
|
|
101
102
|
}
|
|
103
|
+
export interface Alias {
|
|
104
|
+
/**
|
|
105
|
+
* Unique identifier of the alias.
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
/**
|
|
109
|
+
* Email address of the alias as local_part@domain.
|
|
110
|
+
*/
|
|
111
|
+
email: string;
|
|
112
|
+
/**
|
|
113
|
+
* ID of the mailbox to which the alias belongs.
|
|
114
|
+
*/
|
|
115
|
+
mailboxId: string;
|
|
116
|
+
/**
|
|
117
|
+
* Description of the alias.
|
|
118
|
+
*/
|
|
119
|
+
description: string;
|
|
120
|
+
/**
|
|
121
|
+
* Current status of the alias.
|
|
122
|
+
*/
|
|
123
|
+
status: AliasStatus;
|
|
124
|
+
/**
|
|
125
|
+
* Date and time of alias creation.
|
|
126
|
+
*/
|
|
127
|
+
createdAt?: Date;
|
|
128
|
+
/**
|
|
129
|
+
* Date and time when the alias was last updated.
|
|
130
|
+
*/
|
|
131
|
+
updatedAt?: Date;
|
|
132
|
+
}
|
|
102
133
|
export interface Domain {
|
|
103
134
|
/**
|
|
104
135
|
* Unique identifier of the domain.
|
|
@@ -145,36 +176,6 @@ export interface Domain {
|
|
|
145
176
|
*/
|
|
146
177
|
smtpUrl: string;
|
|
147
178
|
}
|
|
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
|
-
}
|
|
178
179
|
export type BatchCreateMailboxesRequest = {
|
|
179
180
|
/**
|
|
180
181
|
* Parameters for the mailboxes to create.
|
|
@@ -196,14 +197,14 @@ export interface BatchCreateMailboxesResponse {
|
|
|
196
197
|
mailboxes: Mailbox[];
|
|
197
198
|
}
|
|
198
199
|
export type CreateAliasRequest = {
|
|
199
|
-
/**
|
|
200
|
-
* ID of the mailbox to associate with the alias.
|
|
201
|
-
*/
|
|
202
|
-
mailboxId: string;
|
|
203
200
|
/**
|
|
204
201
|
* Local part of the email address (e.g. local_part@domain.com).
|
|
205
202
|
*/
|
|
206
203
|
localPart: string;
|
|
204
|
+
/**
|
|
205
|
+
* ID of the mailbox to associate with the alias.
|
|
206
|
+
*/
|
|
207
|
+
mailboxId: string;
|
|
207
208
|
/**
|
|
208
209
|
* (Optional) Description of the alias.
|
|
209
210
|
*/
|
|
@@ -219,6 +220,12 @@ export type CreateDomainRequest = {
|
|
|
219
220
|
*/
|
|
220
221
|
name: string;
|
|
221
222
|
};
|
|
223
|
+
export type DeleteAliasRequest = {
|
|
224
|
+
/**
|
|
225
|
+
* ID of the alias to delete.
|
|
226
|
+
*/
|
|
227
|
+
aliasId: string;
|
|
228
|
+
};
|
|
222
229
|
export type DeleteDomainRequest = {
|
|
223
230
|
/**
|
|
224
231
|
* ID of the domain to delete.
|
|
@@ -231,6 +238,12 @@ export type DeleteMailboxRequest = {
|
|
|
231
238
|
*/
|
|
232
239
|
mailboxId: string;
|
|
233
240
|
};
|
|
241
|
+
export type GetAliasRequest = {
|
|
242
|
+
/**
|
|
243
|
+
* ID of the alias to get.
|
|
244
|
+
*/
|
|
245
|
+
aliasId: string;
|
|
246
|
+
};
|
|
234
247
|
export type GetDomainRecordsRequest = {
|
|
235
248
|
/**
|
|
236
249
|
* (Optional) ID of the domain in which to get the records.
|
|
@@ -299,6 +312,42 @@ export type GetMailboxRequest = {
|
|
|
299
312
|
*/
|
|
300
313
|
mailboxId: string;
|
|
301
314
|
};
|
|
315
|
+
export type ListAliasesRequest = {
|
|
316
|
+
/**
|
|
317
|
+
* Order aliases by specific criteria.
|
|
318
|
+
*/
|
|
319
|
+
orderBy?: ListAliasesRequestOrderBy;
|
|
320
|
+
/**
|
|
321
|
+
* Requested page number. Value must be greater or equal to 1.
|
|
322
|
+
*/
|
|
323
|
+
page?: number;
|
|
324
|
+
/**
|
|
325
|
+
* Requested page size. Value must be between 1 and 100.
|
|
326
|
+
*/
|
|
327
|
+
pageSize?: number;
|
|
328
|
+
/**
|
|
329
|
+
* ID of the mailbox for which to list aliases.
|
|
330
|
+
*/
|
|
331
|
+
mailboxId?: string;
|
|
332
|
+
/**
|
|
333
|
+
* (Optional) Filter aliases by their status.
|
|
334
|
+
*/
|
|
335
|
+
status?: AliasStatus;
|
|
336
|
+
/**
|
|
337
|
+
* Project ID to filter on.
|
|
338
|
+
*/
|
|
339
|
+
projectId?: string;
|
|
340
|
+
};
|
|
341
|
+
export interface ListAliasesResponse {
|
|
342
|
+
/**
|
|
343
|
+
* Number of aliases that match the request (without pagination).
|
|
344
|
+
*/
|
|
345
|
+
totalCount: number;
|
|
346
|
+
/**
|
|
347
|
+
* Single page of aliases matching the requested criteria.
|
|
348
|
+
*/
|
|
349
|
+
aliases: Alias[];
|
|
350
|
+
}
|
|
302
351
|
export type ListDomainsRequest = {
|
|
303
352
|
orderBy?: ListDomainsRequestOrderBy;
|
|
304
353
|
page?: number;
|
|
@@ -342,6 +391,10 @@ export type ListMailboxesRequest = {
|
|
|
342
391
|
* (Optional) Search term to filter mailboxes on name and local_part.
|
|
343
392
|
*/
|
|
344
393
|
search?: string;
|
|
394
|
+
/**
|
|
395
|
+
* (Optional) Project ID to filter mailboxes on.
|
|
396
|
+
*/
|
|
397
|
+
projectId?: string;
|
|
345
398
|
};
|
|
346
399
|
export interface ListMailboxesResponse {
|
|
347
400
|
/**
|
|
@@ -23,6 +23,15 @@ export declare const CreateDomainRequest: {
|
|
|
23
23
|
minLength: number;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
export declare const ListAliasesRequest: {
|
|
27
|
+
page: {
|
|
28
|
+
greaterThanOrEqual: number;
|
|
29
|
+
};
|
|
30
|
+
pageSize: {
|
|
31
|
+
greaterThanOrEqual: number;
|
|
32
|
+
lessThanOrEqual: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
26
35
|
export declare const ListDomainsRequest: {
|
|
27
36
|
page: {
|
|
28
37
|
greaterThanOrEqual: number;
|
|
@@ -4,6 +4,7 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
4
4
|
BatchCreateMailboxesRequestMailboxParameters: () => BatchCreateMailboxesRequestMailboxParameters,
|
|
5
5
|
CreateAliasRequest: () => CreateAliasRequest,
|
|
6
6
|
CreateDomainRequest: () => CreateDomainRequest,
|
|
7
|
+
ListAliasesRequest: () => ListAliasesRequest,
|
|
7
8
|
ListDomainsRequest: () => ListDomainsRequest,
|
|
8
9
|
ListMailboxesRequest: () => ListMailboxesRequest,
|
|
9
10
|
UpdateMailboxRequest: () => UpdateMailboxRequest
|
|
@@ -29,6 +30,13 @@ const CreateDomainRequest = { name: {
|
|
|
29
30
|
maxLength: 253,
|
|
30
31
|
minLength: 1
|
|
31
32
|
} };
|
|
33
|
+
const ListAliasesRequest = {
|
|
34
|
+
page: { greaterThanOrEqual: 1 },
|
|
35
|
+
pageSize: {
|
|
36
|
+
greaterThanOrEqual: 1,
|
|
37
|
+
lessThanOrEqual: 100
|
|
38
|
+
}
|
|
39
|
+
};
|
|
32
40
|
const ListDomainsRequest = {
|
|
33
41
|
page: { greaterThanOrEqual: 1 },
|
|
34
42
|
pageSize: {
|
|
@@ -48,4 +56,4 @@ const UpdateMailboxRequest = { newPassword: {
|
|
|
48
56
|
minLength: 12
|
|
49
57
|
} };
|
|
50
58
|
//#endregion
|
|
51
|
-
export { BatchCreateMailboxesRequestMailboxParameters, CreateAliasRequest, CreateDomainRequest, ListDomainsRequest, ListMailboxesRequest, UpdateMailboxRequest, validation_rules_gen_exports };
|
|
59
|
+
export { BatchCreateMailboxesRequestMailboxParameters, CreateAliasRequest, CreateDomainRequest, ListAliasesRequest, 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.6.1",
|
|
4
4
|
"description": "Scaleway SDK mailbox",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,14 +32,14 @@
|
|
|
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.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
38
|
+
"@scaleway/sdk-client": "^2.4.1",
|
|
39
|
+
"@repo/configs": "^0.1.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@scaleway/sdk-client": "^2.4.
|
|
42
|
+
"@scaleway/sdk-client": "^2.4.1"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=20.20.2"
|