@scaleway/sdk-mailbox 1.6.1 → 1.7.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/LICENSE +191 -0
- package/package.json +9 -8
- package/dist/.vite/license.md +0 -3
- package/dist/_virtual/_rolldown/runtime.js +0 -13
- package/dist/index.gen.d.ts +0 -5
- package/dist/index.gen.js +0 -2
- package/dist/metadata.gen.d.ts +0 -12
- package/dist/metadata.gen.js +0 -13
- package/dist/v1alpha1/api.gen.d.ts +0 -157
- package/dist/v1alpha1/api.gen.js +0 -102
- package/dist/v1alpha1/content.gen.d.ts +0 -9
- package/dist/v1alpha1/content.gen.js +0 -23
- package/dist/v1alpha1/index.gen.d.ts +0 -5
- package/dist/v1alpha1/index.gen.js +0 -28
- package/dist/v1alpha1/marshalling.gen.d.ts +0 -14
- package/dist/v1alpha1/marshalling.gen.js +0 -127
- package/dist/v1alpha1/metadata.gen.d.ts +0 -82
- package/dist/v1alpha1/metadata.gen.js +0 -92
- package/dist/v1alpha1/types.gen.d.ts +0 -434
- package/dist/v1alpha1/types.gen.js +0 -0
- package/dist/v1alpha1/validation-rules.gen.d.ts +0 -58
- package/dist/v1alpha1/validation-rules.gen.js +0 -59
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
-
//#region src/v1alpha1/marshalling.gen.ts
|
|
3
|
-
const unmarshalMailbox = (data) => {
|
|
4
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Mailbox' failed as data isn't a dictionary.`);
|
|
5
|
-
return {
|
|
6
|
-
createdAt: unmarshalDate(data.created_at),
|
|
7
|
-
deletionScheduledAt: unmarshalDate(data.deletion_scheduled_at),
|
|
8
|
-
domainId: data.domain_id,
|
|
9
|
-
email: data.email,
|
|
10
|
-
id: data.id,
|
|
11
|
-
nextSubscriptionPeriod: data.next_subscription_period,
|
|
12
|
-
nextSubscriptionPeriodStartsAt: unmarshalDate(data.next_subscription_period_starts_at),
|
|
13
|
-
status: data.status,
|
|
14
|
-
subscriptionPeriod: data.subscription_period,
|
|
15
|
-
subscriptionPeriodStartedAt: unmarshalDate(data.subscription_period_started_at),
|
|
16
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
17
|
-
};
|
|
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
|
-
};
|
|
31
|
-
const unmarshalDomain = (data) => {
|
|
32
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
|
|
33
|
-
return {
|
|
34
|
-
createdAt: unmarshalDate(data.created_at),
|
|
35
|
-
id: data.id,
|
|
36
|
-
imapUrl: data.imap_url,
|
|
37
|
-
mailboxTotalCount: data.mailbox_total_count,
|
|
38
|
-
name: data.name,
|
|
39
|
-
pop3Url: data.pop3_url,
|
|
40
|
-
projectId: data.project_id,
|
|
41
|
-
smtpUrl: data.smtp_url,
|
|
42
|
-
status: data.status,
|
|
43
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
44
|
-
webmailUrl: data.webmail_url
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
const unmarshalBatchCreateMailboxesResponse = (data) => {
|
|
48
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BatchCreateMailboxesResponse' failed as data isn't a dictionary.`);
|
|
49
|
-
return { mailboxes: unmarshalArrayOfObject(data.mailboxes, unmarshalMailbox) };
|
|
50
|
-
};
|
|
51
|
-
const unmarshalDomainRecord = (data) => {
|
|
52
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
|
|
53
|
-
return {
|
|
54
|
-
createdAt: unmarshalDate(data.created_at),
|
|
55
|
-
dnsName: data.dns_name,
|
|
56
|
-
dnsType: data.dns_type,
|
|
57
|
-
dnsValue: data.dns_value,
|
|
58
|
-
domainId: data.domain_id,
|
|
59
|
-
error: data.error,
|
|
60
|
-
id: data.id,
|
|
61
|
-
level: data.level,
|
|
62
|
-
status: data.status,
|
|
63
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
const unmarshalGetDomainRecordsResponse = (data) => {
|
|
67
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetDomainRecordsResponse' failed as data isn't a dictionary.`);
|
|
68
|
-
return {
|
|
69
|
-
autoconfig: data.autoconfig ? unmarshalDomainRecord(data.autoconfig) : void 0,
|
|
70
|
-
autodiscover: data.autodiscover ? unmarshalDomainRecord(data.autodiscover) : void 0,
|
|
71
|
-
caldav: data.caldav ? unmarshalDomainRecord(data.caldav) : void 0,
|
|
72
|
-
carddav: data.carddav ? unmarshalDomainRecord(data.carddav) : void 0,
|
|
73
|
-
dkim: data.dkim ? unmarshalDomainRecord(data.dkim) : void 0,
|
|
74
|
-
dmarc: data.dmarc ? unmarshalDomainRecord(data.dmarc) : void 0,
|
|
75
|
-
domainValidation: data.domain_validation ? unmarshalDomainRecord(data.domain_validation) : void 0,
|
|
76
|
-
imap: data.imap ? unmarshalDomainRecord(data.imap) : void 0,
|
|
77
|
-
mx: data.mx ? unmarshalDomainRecord(data.mx) : void 0,
|
|
78
|
-
pop3: data.pop3 ? unmarshalDomainRecord(data.pop3) : void 0,
|
|
79
|
-
spf: data.spf ? unmarshalDomainRecord(data.spf) : void 0,
|
|
80
|
-
submission: data.submission ? unmarshalDomainRecord(data.submission) : void 0
|
|
81
|
-
};
|
|
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
|
-
};
|
|
90
|
-
const unmarshalListDomainsResponse = (data) => {
|
|
91
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
|
|
92
|
-
return {
|
|
93
|
-
domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
94
|
-
totalCount: data.total_count
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
const unmarshalListMailboxesResponse = (data) => {
|
|
98
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListMailboxesResponse' failed as data isn't a dictionary.`);
|
|
99
|
-
return {
|
|
100
|
-
mailboxes: unmarshalArrayOfObject(data.mailboxes, unmarshalMailbox),
|
|
101
|
-
totalCount: data.total_count
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
const marshalBatchCreateMailboxesRequestMailboxParameters = (request, defaults) => ({
|
|
105
|
-
local_part: request.localPart,
|
|
106
|
-
password: request.password
|
|
107
|
-
});
|
|
108
|
-
const marshalBatchCreateMailboxesRequest = (request, defaults) => ({
|
|
109
|
-
domain_id: request.domainId,
|
|
110
|
-
mailboxes: request.mailboxes !== void 0 ? request.mailboxes.map((elt) => marshalBatchCreateMailboxesRequestMailboxParameters(elt, defaults)) : void 0,
|
|
111
|
-
subscription_period: request.subscriptionPeriod
|
|
112
|
-
});
|
|
113
|
-
const marshalCreateAliasRequest = (request, defaults) => ({
|
|
114
|
-
description: request.description,
|
|
115
|
-
local_part: request.localPart,
|
|
116
|
-
mailbox_id: request.mailboxId
|
|
117
|
-
});
|
|
118
|
-
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
119
|
-
name: request.name,
|
|
120
|
-
project_id: request.projectId ?? defaults.defaultProjectId
|
|
121
|
-
});
|
|
122
|
-
const marshalUpdateMailboxRequest = (request, defaults) => ({
|
|
123
|
-
new_password: request.newPassword,
|
|
124
|
-
subscription_period: request.subscriptionPeriod
|
|
125
|
-
});
|
|
126
|
-
//#endregion
|
|
127
|
-
export { marshalBatchCreateMailboxesRequest, marshalCreateAliasRequest, marshalCreateDomainRequest, marshalUpdateMailboxRequest, unmarshalAlias, unmarshalBatchCreateMailboxesResponse, unmarshalDomain, unmarshalGetDomainRecordsResponse, unmarshalListAliasesResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export declare const queriesMetadata: {
|
|
2
|
-
readonly namespace: 'mailbox';
|
|
3
|
-
readonly version: 'v1alpha1';
|
|
4
|
-
readonly folderName: 'mailboxv1alpha1';
|
|
5
|
-
readonly services: readonly [{
|
|
6
|
-
readonly apiClass: 'API';
|
|
7
|
-
readonly methods: readonly [{
|
|
8
|
-
readonly methodName: 'listDomains';
|
|
9
|
-
readonly protoName: 'ListDomains';
|
|
10
|
-
readonly paramsType: 'ListDomainsRequest';
|
|
11
|
-
readonly returnType: 'ListDomainsResponse';
|
|
12
|
-
readonly isList: true;
|
|
13
|
-
readonly paginationType: 'offset';
|
|
14
|
-
readonly pageParamKey: 'page';
|
|
15
|
-
readonly listItemType: 'Domain';
|
|
16
|
-
readonly isPrivate: false;
|
|
17
|
-
readonly description: '"';
|
|
18
|
-
}, {
|
|
19
|
-
readonly methodName: 'getDomain';
|
|
20
|
-
readonly protoName: 'GetDomain';
|
|
21
|
-
readonly paramsType: 'GetDomainRequest';
|
|
22
|
-
readonly returnType: 'Domain';
|
|
23
|
-
readonly isList: false;
|
|
24
|
-
readonly paginationType: 'none';
|
|
25
|
-
readonly isPrivate: false;
|
|
26
|
-
readonly description: '"';
|
|
27
|
-
readonly hasWaiter: true;
|
|
28
|
-
}, {
|
|
29
|
-
readonly methodName: 'getDomainRecords';
|
|
30
|
-
readonly protoName: 'GetDomainRecords';
|
|
31
|
-
readonly paramsType: 'GetDomainRecordsRequest';
|
|
32
|
-
readonly returnType: 'GetDomainRecordsResponse';
|
|
33
|
-
readonly isList: false;
|
|
34
|
-
readonly paginationType: 'none';
|
|
35
|
-
readonly isPrivate: false;
|
|
36
|
-
readonly description: '"';
|
|
37
|
-
}, {
|
|
38
|
-
readonly methodName: 'listMailboxes';
|
|
39
|
-
readonly protoName: 'ListMailboxes';
|
|
40
|
-
readonly paramsType: 'ListMailboxesRequest';
|
|
41
|
-
readonly returnType: 'ListMailboxesResponse';
|
|
42
|
-
readonly isList: true;
|
|
43
|
-
readonly paginationType: 'offset';
|
|
44
|
-
readonly pageParamKey: 'page';
|
|
45
|
-
readonly listItemType: 'Mailbox';
|
|
46
|
-
readonly isPrivate: false;
|
|
47
|
-
readonly description: '"';
|
|
48
|
-
}, {
|
|
49
|
-
readonly methodName: 'getMailbox';
|
|
50
|
-
readonly protoName: 'GetMailbox';
|
|
51
|
-
readonly paramsType: 'GetMailboxRequest';
|
|
52
|
-
readonly returnType: 'Mailbox';
|
|
53
|
-
readonly isList: false;
|
|
54
|
-
readonly paginationType: 'none';
|
|
55
|
-
readonly isPrivate: false;
|
|
56
|
-
readonly description: '"';
|
|
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;
|
|
79
|
-
}];
|
|
80
|
-
}];
|
|
81
|
-
};
|
|
82
|
-
export type QueriesMetadata = typeof queriesMetadata;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
//#region src/v1alpha1/metadata.gen.ts
|
|
2
|
-
const queriesMetadata = {
|
|
3
|
-
namespace: "mailbox",
|
|
4
|
-
version: "v1alpha1",
|
|
5
|
-
folderName: "mailboxv1alpha1",
|
|
6
|
-
services: [{
|
|
7
|
-
apiClass: "API",
|
|
8
|
-
methods: [
|
|
9
|
-
{
|
|
10
|
-
methodName: "listDomains",
|
|
11
|
-
protoName: "ListDomains",
|
|
12
|
-
paramsType: "ListDomainsRequest",
|
|
13
|
-
returnType: "ListDomainsResponse",
|
|
14
|
-
isList: true,
|
|
15
|
-
paginationType: "offset",
|
|
16
|
-
pageParamKey: "page",
|
|
17
|
-
listItemType: "Domain",
|
|
18
|
-
isPrivate: false,
|
|
19
|
-
description: "\""
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
methodName: "getDomain",
|
|
23
|
-
protoName: "GetDomain",
|
|
24
|
-
paramsType: "GetDomainRequest",
|
|
25
|
-
returnType: "Domain",
|
|
26
|
-
isList: false,
|
|
27
|
-
paginationType: "none",
|
|
28
|
-
isPrivate: false,
|
|
29
|
-
description: "\"",
|
|
30
|
-
hasWaiter: true
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
methodName: "getDomainRecords",
|
|
34
|
-
protoName: "GetDomainRecords",
|
|
35
|
-
paramsType: "GetDomainRecordsRequest",
|
|
36
|
-
returnType: "GetDomainRecordsResponse",
|
|
37
|
-
isList: false,
|
|
38
|
-
paginationType: "none",
|
|
39
|
-
isPrivate: false,
|
|
40
|
-
description: "\""
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
methodName: "listMailboxes",
|
|
44
|
-
protoName: "ListMailboxes",
|
|
45
|
-
paramsType: "ListMailboxesRequest",
|
|
46
|
-
returnType: "ListMailboxesResponse",
|
|
47
|
-
isList: true,
|
|
48
|
-
paginationType: "offset",
|
|
49
|
-
pageParamKey: "page",
|
|
50
|
-
listItemType: "Mailbox",
|
|
51
|
-
isPrivate: false,
|
|
52
|
-
description: "\""
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
methodName: "getMailbox",
|
|
56
|
-
protoName: "GetMailbox",
|
|
57
|
-
paramsType: "GetMailboxRequest",
|
|
58
|
-
returnType: "Mailbox",
|
|
59
|
-
isList: false,
|
|
60
|
-
paginationType: "none",
|
|
61
|
-
isPrivate: false,
|
|
62
|
-
description: "\"",
|
|
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
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
}]
|
|
90
|
-
};
|
|
91
|
-
//#endregion
|
|
92
|
-
export { queriesMetadata };
|