@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 ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ https://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2019 Scaleway.
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ https://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-mailbox",
3
- "version": "1.6.1",
3
+ "version": "1.7.1",
4
4
  "description": "Scaleway SDK mailbox",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
+ "url": "https://github.com/scaleway/scaleway-sdk-js.git",
8
9
  "directory": "packages_generated/mailbox"
9
10
  },
10
11
  "files": [
@@ -31,23 +32,23 @@
31
32
  }
32
33
  },
33
34
  "dependencies": {
34
- "@scaleway/random-name": "5.1.4",
35
- "@scaleway/sdk-std": "2.4.3"
35
+ "@scaleway/random-name": "6.0.2",
36
+ "@scaleway/sdk-std": "2.4.4"
36
37
  },
37
38
  "devDependencies": {
38
- "@scaleway/sdk-client": "^2.4.1",
39
- "@repo/configs": "^0.1.1"
39
+ "@repo/configs": "^0.1.1",
40
+ "@scaleway/sdk-client": "^2.5.0"
40
41
  },
41
42
  "peerDependencies": {
42
- "@scaleway/sdk-client": "^2.4.1"
43
+ "@scaleway/sdk-client": "^2.5.0"
43
44
  },
44
45
  "engines": {
45
46
  "node": ">=20.20.2"
46
47
  },
47
48
  "scripts": {
48
49
  "package:check": "pnpm publint",
49
- "typecheck": "tsgo --noEmit",
50
- "type:generate": "tsgo --declaration -p tsconfig.build.json",
50
+ "typecheck": "tsc --noEmit",
51
+ "type:generate": "tsc --declaration -p tsconfig.build.json",
51
52
  "build": "vite build --config vite.config.ts && pnpm run type:generate",
52
53
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
53
54
  }
@@ -1,3 +0,0 @@
1
- # Licenses
2
-
3
- The app does not bundle any dependencies with licenses.
@@ -1,13 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true
8
- });
9
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
- return target;
11
- };
12
- //#endregion
13
- export { __exportAll };
@@ -1,5 +0,0 @@
1
- /**
2
- * This file is automatically generated
3
- * PLEASE DO NOT EDIT HERE
4
- */
5
- export * as Mailboxv1alpha1 from './v1alpha1/index.gen.js';
package/dist/index.gen.js DELETED
@@ -1,2 +0,0 @@
1
- import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
- export { index_gen_exports as Mailboxv1alpha1 };
@@ -1,12 +0,0 @@
1
- /**
2
- * This file is automatically generated
3
- * PLEASE DO NOT EDIT HERE
4
- */
5
- export declare const pkgMetadata: {
6
- readonly name: "@scaleway/sdk-mailbox";
7
- readonly namespace: "mailbox";
8
- readonly displayName: "Mailbox";
9
- readonly versions: readonly ["v1alpha1"];
10
- };
11
- export type Metadata = typeof pkgMetadata;
12
- export default pkgMetadata;
@@ -1,13 +0,0 @@
1
- //#region src/metadata.gen.ts
2
- /**
3
- * This file is automatically generated
4
- * PLEASE DO NOT EDIT HERE
5
- */
6
- const pkgMetadata = {
7
- name: "@scaleway/sdk-mailbox",
8
- namespace: "mailbox",
9
- displayName: "Mailbox",
10
- versions: ["v1alpha1"]
11
- };
12
- //#endregion
13
- export { pkgMetadata as default, pkgMetadata };
@@ -1,157 +0,0 @@
1
- import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { WaitForOptions } from '@scaleway/sdk-client';
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
- /**
5
- * Mailbox API.
6
-
7
- This API allows you to manage your Mailbox services.
8
- */
9
- export declare class API extends ParentAPI {
10
- /**
11
- * Register a domain in a project.. You must specify a `project_id` and a `domain_name` to register a domain in a specific Project.
12
- *
13
- * @param request - The request {@link CreateDomainRequest}
14
- * @returns A Promise of Domain
15
- */
16
- createDomain: (request: Readonly<CreateDomainRequest>) => Promise<Domain>;
17
- protected pageOfListDomains: (request?: Readonly<ListDomainsRequest>) => Promise<ListDomainsResponse>;
18
- /**
19
- * List domains in an organization.. The return list can be filtered with request parameters.
20
- *
21
- * @param request - The request {@link ListDomainsRequest}
22
- * @returns A Promise of ListDomainsResponse
23
- */
24
- listDomains: (request?: Readonly<ListDomainsRequest>) => Promise<ListDomainsResponse> & {
25
- all: () => Promise<Domain[]>;
26
- [Symbol.asyncIterator]: () => AsyncGenerator<Domain[], void, void>;
27
- };
28
- /**
29
- * Get a domain by its ID.. Get a domain by its ID.
30
- *
31
- * @param request - The request {@link GetDomainRequest}
32
- * @returns A Promise of Domain
33
- */
34
- getDomain: (request: Readonly<GetDomainRequest>) => Promise<Domain>;
35
- /**
36
- * Waits for {@link Domain} to be in a final state.
37
- *
38
- * @param request - The request {@link GetDomainRequest}
39
- * @param options - The waiting options
40
- * @returns A Promise of Domain
41
- */
42
- waitForDomain: (request: Readonly<GetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>) => Promise<Domain>;
43
- /**
44
- * Delete a domain by its ID.. Delete a domain by its ID.
45
- *
46
- * @param request - The request {@link DeleteDomainRequest}
47
- * @returns A Promise of Domain
48
- */
49
- deleteDomain: (request: Readonly<DeleteDomainRequest>) => Promise<Domain>;
50
- /**
51
- * Get domain records by its ID.. Get domain records by its ID.
52
- *
53
- * @param request - The request {@link GetDomainRecordsRequest}
54
- * @returns A Promise of GetDomainRecordsResponse
55
- */
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
- */
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
- */
69
- batchCreateMailboxes: (request: Readonly<BatchCreateMailboxesRequest>) => Promise<BatchCreateMailboxesResponse>;
70
- protected pageOfListMailboxes: (request?: Readonly<ListMailboxesRequest>) => Promise<ListMailboxesResponse>;
71
- /**
72
- * List mailboxes in an organization.. The return list can be filtered with request parameters.
73
- *
74
- * @param request - The request {@link ListMailboxesRequest}
75
- * @returns A Promise of ListMailboxesResponse
76
- */
77
- listMailboxes: (request?: Readonly<ListMailboxesRequest>) => Promise<ListMailboxesResponse> & {
78
- all: () => Promise<Mailbox[]>;
79
- [Symbol.asyncIterator]: () => AsyncGenerator<Mailbox[], void, void>;
80
- };
81
- /**
82
- * Get a mailbox by its ID.. Get a mailbox by its ID.
83
- *
84
- * @param request - The request {@link GetMailboxRequest}
85
- * @returns A Promise of Mailbox
86
- */
87
- getMailbox: (request: Readonly<GetMailboxRequest>) => Promise<Mailbox>;
88
- /**
89
- * Waits for {@link Mailbox} to be in a final state.
90
- *
91
- * @param request - The request {@link GetMailboxRequest}
92
- * @param options - The waiting options
93
- * @returns A Promise of Mailbox
94
- */
95
- waitForMailbox: (request: Readonly<GetMailboxRequest>, options?: Readonly<WaitForOptions<Mailbox>>) => Promise<Mailbox>;
96
- /**
97
- * Update a mailbox subscription period or password with its ID.. Update a mailbox subscription period or password with its ID.
98
- *
99
- * @param request - The request {@link UpdateMailboxRequest}
100
- * @returns A Promise of Mailbox
101
- */
102
- updateMailbox: (request: Readonly<UpdateMailboxRequest>) => Promise<Mailbox>;
103
- /**
104
- * Delete a mailbox by its ID.. Delete a mailbox by its ID.
105
- *
106
- * @param request - The request {@link DeleteMailboxRequest}
107
- * @returns A Promise of Mailbox
108
- */
109
- deleteMailbox: (request: Readonly<DeleteMailboxRequest>) => Promise<Mailbox>;
110
- /**
111
- * Restore a mailbox in deletion scheduled status by its ID.. Restore a mailbox in deletion scheduled status by its ID.
112
- *
113
- * @param request - The request {@link RestoreMailboxRequest}
114
- * @returns A Promise of Mailbox
115
- */
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>;
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>;
157
- }
@@ -1,102 +0,0 @@
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
- import { API as API$1, enrichForPagination, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
- //#region src/v1alpha1/api.gen.ts
5
- const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
6
- /**
7
- * Mailbox API.
8
-
9
- This API allows you to manage your Mailbox services.
10
- */
11
- var API = class extends API$1 {
12
- constructor(..._args) {
13
- super(..._args);
14
- this.createDomain = (request) => this.client.fetch({
15
- body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
16
- headers: jsonContentHeaders,
17
- method: "POST",
18
- path: `/mailbox/v1alpha1/domains`
19
- }, unmarshalDomain);
20
- this.pageOfListDomains = (request = {}) => this.client.fetch({
21
- method: "GET",
22
- path: `/mailbox/v1alpha1/domains`,
23
- urlParams: urlParams(["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])
24
- }, unmarshalListDomainsResponse);
25
- this.listDomains = (request = {}) => enrichForPagination("domains", this.pageOfListDomains, request);
26
- this.getDomain = (request) => this.client.fetch({
27
- method: "GET",
28
- path: `/mailbox/v1alpha1/domains/${validatePathParam("domainId", request.domainId)}`
29
- }, unmarshalDomain);
30
- this.waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
31
- this.deleteDomain = (request) => this.client.fetch({
32
- method: "DELETE",
33
- path: `/mailbox/v1alpha1/domains/${validatePathParam("domainId", request.domainId)}`
34
- }, unmarshalDomain);
35
- this.getDomainRecords = (request) => this.client.fetch({
36
- method: "GET",
37
- path: `/mailbox/v1alpha1/domains/${validatePathParam("domainId", request.domainId)}/records`
38
- }, unmarshalGetDomainRecordsResponse);
39
- this.validateDomainRecords = (request) => this.client.fetch({
40
- body: "{}",
41
- headers: jsonContentHeaders,
42
- method: "POST",
43
- path: `/mailbox/v1alpha1/domains/${validatePathParam("domainId", request.domainId)}/validate-records`
44
- });
45
- this.batchCreateMailboxes = (request) => this.client.fetch({
46
- body: JSON.stringify(marshalBatchCreateMailboxesRequest(request, this.client.settings)),
47
- headers: jsonContentHeaders,
48
- method: "POST",
49
- path: `/mailbox/v1alpha1/batch-create-mailboxes`
50
- }, unmarshalBatchCreateMailboxesResponse);
51
- this.pageOfListMailboxes = (request = {}) => this.client.fetch({
52
- method: "GET",
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], ["project_id", request.projectId], ["search", request.search], ["statuses", request.statuses])
55
- }, unmarshalListMailboxesResponse);
56
- this.listMailboxes = (request = {}) => enrichForPagination("mailboxes", this.pageOfListMailboxes, request);
57
- this.getMailbox = (request) => this.client.fetch({
58
- method: "GET",
59
- path: `/mailbox/v1alpha1/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}`
60
- }, unmarshalMailbox);
61
- this.waitForMailbox = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!MAILBOX_TRANSIENT_STATUSES.includes(res.status))), this.getMailbox, request, options);
62
- this.updateMailbox = (request) => this.client.fetch({
63
- body: JSON.stringify(marshalUpdateMailboxRequest(request, this.client.settings)),
64
- headers: jsonContentHeaders,
65
- method: "PATCH",
66
- path: `/mailbox/v1alpha1/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}`
67
- }, unmarshalMailbox);
68
- this.deleteMailbox = (request) => this.client.fetch({
69
- method: "DELETE",
70
- path: `/mailbox/v1alpha1/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}`
71
- }, unmarshalMailbox);
72
- this.restoreMailbox = (request) => this.client.fetch({
73
- body: "{}",
74
- headers: jsonContentHeaders,
75
- method: "POST",
76
- path: `/mailbox/v1alpha1/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}/restore`
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/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)}`
98
- }, unmarshalAlias);
99
- }
100
- };
101
- //#endregion
102
- export { API };
@@ -1,9 +0,0 @@
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[];
4
- /** Lists transient statutes of the enum {@link DomainRecordStatus}. */
5
- export declare const DOMAIN_RECORD_TRANSIENT_STATUSES: DomainRecordStatus[];
6
- /** Lists transient statutes of the enum {@link DomainStatus}. */
7
- export declare const DOMAIN_TRANSIENT_STATUSES: DomainStatus[];
8
- /** Lists transient statutes of the enum {@link MailboxStatus}. */
9
- export declare const MAILBOX_TRANSIENT_STATUSES: MailboxStatus[];
@@ -1,23 +0,0 @@
1
- //#region src/v1alpha1/content.gen.ts
2
- /** Lists transient statutes of the enum {@link AliasStatus}. */
3
- const ALIAS_TRANSIENT_STATUSES = ["provisioning", "deleting"];
4
- /** Lists transient statutes of the enum {@link DomainRecordStatus}. */
5
- const DOMAIN_RECORD_TRANSIENT_STATUSES = ["validating"];
6
- /** Lists transient statutes of the enum {@link DomainStatus}. */
7
- const DOMAIN_TRANSIENT_STATUSES = [
8
- "creating",
9
- "validating",
10
- "provisioning",
11
- "deleting"
12
- ];
13
- /** Lists transient statutes of the enum {@link MailboxStatus}. */
14
- const MAILBOX_TRANSIENT_STATUSES = [
15
- "creating",
16
- "waiting_payment",
17
- "waiting_domain",
18
- "renewing",
19
- "deleting",
20
- "restoring"
21
- ];
22
- //#endregion
23
- export { ALIAS_TRANSIENT_STATUSES, DOMAIN_RECORD_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, MAILBOX_TRANSIENT_STATUSES };
@@ -1,5 +0,0 @@
1
- export { API, } from './api.gen.js';
2
- export * from './content.gen.js';
3
- export * from './marshalling.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
- export * as ValidationRules from './validation-rules.gen.js';
@@ -1,28 +0,0 @@
1
- import { __exportAll } from "../_virtual/_rolldown/runtime.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, unmarshalListAliasesResponse, unmarshalListDomainsResponse, unmarshalListMailboxesResponse, unmarshalMailbox } from "./marshalling.gen.js";
4
- import { API } from "./api.gen.js";
5
- import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
- //#region src/v1alpha1/index.gen.ts
7
- var index_gen_exports = /* @__PURE__ */ __exportAll({
8
- ALIAS_TRANSIENT_STATUSES: () => ALIAS_TRANSIENT_STATUSES,
9
- API: () => API,
10
- DOMAIN_RECORD_TRANSIENT_STATUSES: () => DOMAIN_RECORD_TRANSIENT_STATUSES,
11
- DOMAIN_TRANSIENT_STATUSES: () => DOMAIN_TRANSIENT_STATUSES,
12
- MAILBOX_TRANSIENT_STATUSES: () => MAILBOX_TRANSIENT_STATUSES,
13
- ValidationRules: () => validation_rules_gen_exports,
14
- marshalBatchCreateMailboxesRequest: () => marshalBatchCreateMailboxesRequest,
15
- marshalCreateAliasRequest: () => marshalCreateAliasRequest,
16
- marshalCreateDomainRequest: () => marshalCreateDomainRequest,
17
- marshalUpdateMailboxRequest: () => marshalUpdateMailboxRequest,
18
- unmarshalAlias: () => unmarshalAlias,
19
- unmarshalBatchCreateMailboxesResponse: () => unmarshalBatchCreateMailboxesResponse,
20
- unmarshalDomain: () => unmarshalDomain,
21
- unmarshalGetDomainRecordsResponse: () => unmarshalGetDomainRecordsResponse,
22
- unmarshalListAliasesResponse: () => unmarshalListAliasesResponse,
23
- unmarshalListDomainsResponse: () => unmarshalListDomainsResponse,
24
- unmarshalListMailboxesResponse: () => unmarshalListMailboxesResponse,
25
- unmarshalMailbox: () => unmarshalMailbox
26
- });
27
- //#endregion
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,14 +0,0 @@
1
- import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { Mailbox, Alias, Domain, BatchCreateMailboxesResponse, GetDomainRecordsResponse, ListAliasesResponse, ListDomainsResponse, ListMailboxesResponse, BatchCreateMailboxesRequest, CreateAliasRequest, CreateDomainRequest, UpdateMailboxRequest } from './types.gen.js';
3
- export declare const unmarshalMailbox: (data: unknown) => Mailbox;
4
- export declare const unmarshalAlias: (data: unknown) => Alias;
5
- export declare const unmarshalDomain: (data: unknown) => Domain;
6
- export declare const unmarshalBatchCreateMailboxesResponse: (data: unknown) => BatchCreateMailboxesResponse;
7
- export declare const unmarshalGetDomainRecordsResponse: (data: unknown) => GetDomainRecordsResponse;
8
- export declare const unmarshalListAliasesResponse: (data: unknown) => ListAliasesResponse;
9
- export declare const unmarshalListDomainsResponse: (data: unknown) => ListDomainsResponse;
10
- export declare const unmarshalListMailboxesResponse: (data: unknown) => ListMailboxesResponse;
11
- export declare const marshalBatchCreateMailboxesRequest: (request: BatchCreateMailboxesRequest, defaults: DefaultValues) => Record<string, unknown>;
12
- export declare const marshalCreateAliasRequest: (request: CreateAliasRequest, defaults: DefaultValues) => Record<string, unknown>;
13
- export declare const marshalCreateDomainRequest: (request: CreateDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
14
- export declare const marshalUpdateMailboxRequest: (request: UpdateMailboxRequest, defaults: DefaultValues) => Record<string, unknown>;