@scaleway/sdk 2.67.0 → 2.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/audit_trail/v1alpha1/api.gen.cjs +6 -1
- package/dist/api/audit_trail/v1alpha1/api.gen.js +6 -1
- package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +6 -0
- package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +6 -0
- package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +55 -15
- package/dist/api/audit_trail/v1alpha1/validation-rules.gen.cjs +3 -0
- package/dist/api/audit_trail/v1alpha1/validation-rules.gen.d.ts +3 -0
- package/dist/api/audit_trail/v1alpha1/validation-rules.gen.js +3 -0
- package/dist/api/baremetal/v1/api.gen.cjs +13 -0
- package/dist/api/baremetal/v1/api.gen.d.ts +8 -1
- package/dist/api/baremetal/v1/api.gen.js +13 -0
- package/dist/api/baremetal/v1/content.gen.cjs +2 -1
- package/dist/api/baremetal/v1/content.gen.js +2 -1
- package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
- package/dist/api/baremetal/v1/marshalling.gen.cjs +1 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +1 -0
- package/dist/api/baremetal/v1/types.gen.d.ts +9 -1
- package/dist/api/billing/v2beta1/api.gen.cjs +9 -2
- package/dist/api/billing/v2beta1/api.gen.d.ts +9 -2
- package/dist/api/billing/v2beta1/api.gen.js +9 -2
- package/dist/api/billing/v2beta1/types.gen.d.ts +1 -1
- package/dist/api/block/index.gen.cjs +4 -2
- package/dist/api/block/index.gen.d.ts +1 -0
- package/dist/api/block/index.gen.js +4 -2
- package/dist/api/block/v1/api.gen.cjs +303 -0
- package/dist/api/block/v1/api.gen.d.ts +152 -0
- package/dist/api/block/v1/api.gen.js +303 -0
- package/dist/api/block/v1/content.gen.cjs +22 -0
- package/dist/api/block/v1/content.gen.d.ts +7 -0
- package/dist/api/block/v1/content.gen.js +22 -0
- package/dist/api/block/v1/index.gen.cjs +10 -0
- package/dist/api/block/v1/index.gen.d.ts +4 -0
- package/dist/api/block/v1/index.gen.js +10 -0
- package/dist/api/block/v1/marshalling.gen.cjs +200 -0
- package/dist/api/block/v1/marshalling.gen.d.ts +14 -0
- package/dist/api/block/v1/marshalling.gen.js +200 -0
- package/dist/api/block/v1/types.gen.d.ts +335 -0
- package/dist/api/block/v1/validation-rules.gen.cjs +56 -0
- package/dist/api/block/v1/validation-rules.gen.d.ts +47 -0
- package/dist/api/block/v1/validation-rules.gen.js +56 -0
- package/dist/api/block/v1alpha1/api.gen.cjs +1 -0
- package/dist/api/block/v1alpha1/api.gen.js +1 -0
- package/dist/api/block/v1alpha1/types.gen.d.ts +5 -0
- package/dist/api/edge_services/index.gen.cjs +2 -0
- package/dist/api/edge_services/index.gen.d.ts +1 -0
- package/dist/api/edge_services/index.gen.js +3 -1
- package/dist/api/edge_services/v1beta1/api.gen.cjs +941 -0
- package/dist/api/edge_services/v1beta1/api.gen.d.ts +454 -0
- package/dist/api/edge_services/v1beta1/api.gen.js +941 -0
- package/dist/api/edge_services/v1beta1/content.gen.cjs +8 -0
- package/dist/api/edge_services/v1beta1/content.gen.d.ts +5 -0
- package/dist/api/edge_services/v1beta1/content.gen.js +8 -0
- package/dist/api/{webhosting/v1alpha1 → edge_services/v1beta1}/index.gen.cjs +2 -2
- package/dist/api/edge_services/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/edge_services/v1beta1/index.gen.js +9 -0
- package/dist/api/edge_services/v1beta1/marshalling.gen.cjs +809 -0
- package/dist/api/edge_services/v1beta1/marshalling.gen.d.ts +54 -0
- package/dist/api/edge_services/v1beta1/marshalling.gen.js +809 -0
- package/dist/api/edge_services/v1beta1/types.gen.d.ts +1218 -0
- package/dist/api/edge_services/v1beta1/validation-rules.gen.cjs +23 -0
- package/dist/api/edge_services/v1beta1/validation-rules.gen.d.ts +18 -0
- package/dist/api/edge_services/v1beta1/validation-rules.gen.js +23 -0
- package/dist/api/iam/v1alpha1/api.gen.cjs +7 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +2 -1
- package/dist/api/iam/v1alpha1/api.gen.js +8 -1
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +51 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +51 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +24 -0
- package/dist/api/instance/v1/api.gen.cjs +18 -0
- package/dist/api/instance/v1/api.gen.d.ts +13 -1
- package/dist/api/instance/v1/api.gen.js +19 -1
- package/dist/api/instance/v1/index.gen.d.ts +1 -1
- package/dist/api/instance/v1/marshalling.gen.cjs +12 -0
- package/dist/api/instance/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/instance/v1/marshalling.gen.js +12 -0
- package/dist/api/instance/v1/types.gen.d.ts +12 -0
- package/dist/api/lb/v1/marshalling.gen.cjs +2 -0
- package/dist/api/lb/v1/marshalling.gen.js +2 -0
- package/dist/api/lb/v1/types.gen.d.ts +2 -0
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +11 -0
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +2 -1
- package/dist/api/mongodb/v1alpha1/api.gen.js +12 -1
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +26 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/mongodb/v1alpha1/marshalling.gen.js +26 -1
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +29 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +8 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +7 -0
- package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +8 -0
- package/dist/api/secret/v1beta1/api.gen.cjs +2 -34
- package/dist/api/secret/v1beta1/api.gen.d.ts +3 -19
- package/dist/api/secret/v1beta1/api.gen.js +2 -34
- package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/types.gen.d.ts +3 -19
- package/dist/api/tem/v1alpha1/types.gen.d.ts +5 -5
- package/dist/api/vpcgw/v1/api.gen.cjs +7 -0
- package/dist/api/vpcgw/v1/api.gen.d.ts +7 -0
- package/dist/api/vpcgw/v1/api.gen.js +7 -0
- package/dist/api/vpcgw/v1/types.gen.d.ts +1 -0
- package/dist/api/webhosting/index.gen.cjs +0 -2
- package/dist/api/webhosting/index.gen.d.ts +0 -1
- package/dist/api/webhosting/index.gen.js +1 -3
- package/dist/api/webhosting/v1/content.gen.cjs +0 -6
- package/dist/api/webhosting/v1/content.gen.d.ts +1 -3
- package/dist/api/webhosting/v1/content.gen.js +0 -6
- package/dist/api/webhosting/v1/index.gen.cjs +0 -1
- package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
- package/dist/api/webhosting/v1/index.gen.js +1 -2
- package/dist/api/webhosting/v1/marshalling.gen.cjs +1 -2
- package/dist/api/webhosting/v1/marshalling.gen.js +1 -2
- package/dist/api/webhosting/v1/types.gen.d.ts +3 -6
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/standard/quotas-exceeded-error.cjs +1 -1
- package/dist/scw/errors/standard/quotas-exceeded-error.d.ts +4 -4
- package/dist/scw/errors/standard/quotas-exceeded-error.js +1 -1
- package/package.json +2 -2
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +0 -339
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +0 -168
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -339
- package/dist/api/webhosting/v1alpha1/content.gen.cjs +0 -8
- package/dist/api/webhosting/v1alpha1/content.gen.d.ts +0 -3
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -8
- package/dist/api/webhosting/v1alpha1/index.gen.d.ts +0 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -9
- package/dist/api/webhosting/v1alpha1/marshalling.gen.cjs +0 -300
- package/dist/api/webhosting/v1alpha1/marshalling.gen.d.ts +0 -17
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -300
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +0 -480
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.cjs +0 -32
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.d.ts +0 -27
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -32
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { API as ParentAPI } from '../../../bridge';
|
|
2
|
-
import type { Region as ScwRegion, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, ClassicMailApiCreateMailboxRequest, ClassicMailApiDeleteMailboxRequest, ClassicMailApiGetMailboxRequest, ClassicMailApiListMailboxesRequest, ClassicMailApiUpdateMailboxRequest, CreateHostingRequest, CreateSessionRequest, DeleteHostingRequest, DnsRecords, GetDomainDnsRecordsRequest, GetHostingRequest, Hosting, ListControlPanelsRequest, ListControlPanelsResponse, ListHostingsRequest, ListHostingsResponse, ListMailboxesResponse, ListOffersRequest, ListOffersResponse, Mailbox, ResetHostingPasswordRequest, ResetHostingPasswordResponse, RestoreHostingRequest, Session, UpdateHostingRequest } from './types.gen';
|
|
4
|
-
/**
|
|
5
|
-
* Web Hosting API.
|
|
6
|
-
*
|
|
7
|
-
* This API allows you to manage your Web Hosting services.
|
|
8
|
-
*/
|
|
9
|
-
export declare class API extends ParentAPI {
|
|
10
|
-
/** Lists the available regions of the API. */
|
|
11
|
-
static readonly LOCALITIES: ScwRegion[];
|
|
12
|
-
/**
|
|
13
|
-
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
|
|
14
|
-
* type required via the `offer_id` parameter.
|
|
15
|
-
*
|
|
16
|
-
* @param request - The request {@link CreateHostingRequest}
|
|
17
|
-
* @returns A Promise of Hosting
|
|
18
|
-
*/
|
|
19
|
-
createHosting: (request: Readonly<CreateHostingRequest>) => Promise<Hosting>;
|
|
20
|
-
protected pageOfListHostings: (request?: Readonly<ListHostingsRequest>) => Promise<ListHostingsResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* List all Web Hosting plans. List all of your existing Web Hosting plans.
|
|
23
|
-
* Various filters are available to limit the results, including filtering by
|
|
24
|
-
* domain, status, tag and Project ID.
|
|
25
|
-
*
|
|
26
|
-
* @param request - The request {@link ListHostingsRequest}
|
|
27
|
-
* @returns A Promise of ListHostingsResponse
|
|
28
|
-
*/
|
|
29
|
-
listHostings: (request?: Readonly<ListHostingsRequest>) => Promise<ListHostingsResponse> & {
|
|
30
|
-
all: () => Promise<Hosting[]>;
|
|
31
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<Hosting[], void, void>;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Get a Web Hosting plan. Get the details of one of your existing Web Hosting
|
|
35
|
-
* plans, specified by its `hosting_id`.
|
|
36
|
-
*
|
|
37
|
-
* @param request - The request {@link GetHostingRequest}
|
|
38
|
-
* @returns A Promise of Hosting
|
|
39
|
-
*/
|
|
40
|
-
getHosting: (request: Readonly<GetHostingRequest>) => Promise<Hosting>;
|
|
41
|
-
/**
|
|
42
|
-
* Waits for {@link Hosting} to be in a final state.
|
|
43
|
-
*
|
|
44
|
-
* @param request - The request {@link GetHostingRequest}
|
|
45
|
-
* @param options - The waiting options
|
|
46
|
-
* @returns A Promise of Hosting
|
|
47
|
-
*/
|
|
48
|
-
waitForHosting: (request: Readonly<GetHostingRequest>, options?: Readonly<WaitForOptions<Hosting>>) => Promise<Hosting>;
|
|
49
|
-
/**
|
|
50
|
-
* Update a Web Hosting plan. Update the details of one of your existing Web
|
|
51
|
-
* Hosting plans, specified by its `hosting_id`. You can update parameters
|
|
52
|
-
* including the contact email address, tags, options and offer.
|
|
53
|
-
*
|
|
54
|
-
* @param request - The request {@link UpdateHostingRequest}
|
|
55
|
-
* @returns A Promise of Hosting
|
|
56
|
-
*/
|
|
57
|
-
updateHosting: (request: Readonly<UpdateHostingRequest>) => Promise<Hosting>;
|
|
58
|
-
/**
|
|
59
|
-
* Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its
|
|
60
|
-
* `hosting_id`. Note that deletion is not immediate: it will take place at
|
|
61
|
-
* the end of the calendar month, after which time your Web Hosting plan and
|
|
62
|
-
* all its data (files and emails) will be irreversibly lost.
|
|
63
|
-
*
|
|
64
|
-
* @param request - The request {@link DeleteHostingRequest}
|
|
65
|
-
* @returns A Promise of Hosting
|
|
66
|
-
*/
|
|
67
|
-
deleteHosting: (request: Readonly<DeleteHostingRequest>) => Promise<Hosting>;
|
|
68
|
-
/**
|
|
69
|
-
* Restore a Web Hosting plan. When you [delete a Web Hosting
|
|
70
|
-
* plan](#path-hostings-delete-a-hosting), definitive deletion does not take
|
|
71
|
-
* place until the end of the calendar month. In the time between initiating
|
|
72
|
-
* the deletion, and definitive deletion at the end of the month, you can
|
|
73
|
-
* choose to **restore** the Web Hosting plan, using this endpoint and
|
|
74
|
-
* specifying its `hosting_id`.
|
|
75
|
-
*
|
|
76
|
-
* @param request - The request {@link RestoreHostingRequest}
|
|
77
|
-
* @returns A Promise of Hosting
|
|
78
|
-
*/
|
|
79
|
-
restoreHosting: (request: Readonly<RestoreHostingRequest>) => Promise<Hosting>;
|
|
80
|
-
/**
|
|
81
|
-
* Get DNS records. Get the set of DNS records of a specified domain
|
|
82
|
-
* associated with a Web Hosting plan.
|
|
83
|
-
*
|
|
84
|
-
* @param request - The request {@link GetDomainDnsRecordsRequest}
|
|
85
|
-
* @returns A Promise of DnsRecords
|
|
86
|
-
*/
|
|
87
|
-
getDomainDnsRecords: (request: Readonly<GetDomainDnsRecordsRequest>) => Promise<DnsRecords>;
|
|
88
|
-
/**
|
|
89
|
-
* "Check whether you own this domain or not.".
|
|
90
|
-
*
|
|
91
|
-
* @param request - The request {@link CheckUserOwnsDomainRequest}
|
|
92
|
-
* @returns A Promise of CheckUserOwnsDomainResponse
|
|
93
|
-
*/
|
|
94
|
-
checkUserOwnsDomain: (request: Readonly<CheckUserOwnsDomainRequest>) => Promise<CheckUserOwnsDomainResponse>;
|
|
95
|
-
/**
|
|
96
|
-
* List all offers. List the different Web Hosting offers, and their options,
|
|
97
|
-
* available to order from Scaleway.
|
|
98
|
-
*
|
|
99
|
-
* @param request - The request {@link ListOffersRequest}
|
|
100
|
-
* @returns A Promise of ListOffersResponse
|
|
101
|
-
*/
|
|
102
|
-
listOffers: (request: Readonly<ListOffersRequest>) => Promise<ListOffersResponse>;
|
|
103
|
-
protected pageOfListControlPanels: (request?: Readonly<ListControlPanelsRequest>) => Promise<ListControlPanelsResponse>;
|
|
104
|
-
/**
|
|
105
|
-
* "List the control panels type: cpanel or plesk.".
|
|
106
|
-
*
|
|
107
|
-
* @param request - The request {@link ListControlPanelsRequest}
|
|
108
|
-
* @returns A Promise of ListControlPanelsResponse
|
|
109
|
-
*/
|
|
110
|
-
listControlPanels: (request?: Readonly<ListControlPanelsRequest>) => Promise<ListControlPanelsResponse> & {
|
|
111
|
-
all: () => Promise<import("./types.gen").ControlPanel[]>;
|
|
112
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ControlPanel[], void, void>;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Create a user session.
|
|
116
|
-
*
|
|
117
|
-
* @param request - The request {@link CreateSessionRequest}
|
|
118
|
-
* @returns A Promise of Session
|
|
119
|
-
*/
|
|
120
|
-
createSession: (request: Readonly<CreateSessionRequest>) => Promise<Session>;
|
|
121
|
-
resetHostingPassword: (request: Readonly<ResetHostingPasswordRequest>) => Promise<ResetHostingPasswordResponse>;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Web Hosting Classic Mailbox API.
|
|
125
|
-
*
|
|
126
|
-
* This API allows you to manage your mailboxes for your Web Hosting services.
|
|
127
|
-
*/
|
|
128
|
-
export declare class ClassicMailAPI extends ParentAPI {
|
|
129
|
-
/** Lists the available regions of the API. */
|
|
130
|
-
static readonly LOCALITIES: ScwRegion[];
|
|
131
|
-
/**
|
|
132
|
-
* Create a new mailbox within your hosting plan.. Create a new mailbox within
|
|
133
|
-
* your hosting plan.
|
|
134
|
-
*
|
|
135
|
-
* @param request - The request {@link ClassicMailApiCreateMailboxRequest}
|
|
136
|
-
* @returns A Promise of Mailbox
|
|
137
|
-
*/
|
|
138
|
-
createMailbox: (request: Readonly<ClassicMailApiCreateMailboxRequest>) => Promise<Mailbox>;
|
|
139
|
-
/**
|
|
140
|
-
* Get a mailbox by id within your hosting plan.. Get a mailbox by id within
|
|
141
|
-
* your hosting plan.
|
|
142
|
-
*
|
|
143
|
-
* @param request - The request {@link ClassicMailApiGetMailboxRequest}
|
|
144
|
-
* @returns A Promise of Mailbox
|
|
145
|
-
*/
|
|
146
|
-
getMailbox: (request: Readonly<ClassicMailApiGetMailboxRequest>) => Promise<Mailbox>;
|
|
147
|
-
protected pageOfListMailboxes: (request: Readonly<ClassicMailApiListMailboxesRequest>) => Promise<ListMailboxesResponse>;
|
|
148
|
-
/**
|
|
149
|
-
* List all mailboxes within your hosting plan.. List all mailboxes within
|
|
150
|
-
* your hosting plan.
|
|
151
|
-
*
|
|
152
|
-
* @param request - The request {@link ClassicMailApiListMailboxesRequest}
|
|
153
|
-
* @returns A Promise of ListMailboxesResponse
|
|
154
|
-
*/
|
|
155
|
-
listMailboxes: (request: Readonly<ClassicMailApiListMailboxesRequest>) => Promise<ListMailboxesResponse> & {
|
|
156
|
-
all: () => Promise<Mailbox[]>;
|
|
157
|
-
[Symbol.asyncIterator]: () => AsyncGenerator<Mailbox[], void, void>;
|
|
158
|
-
};
|
|
159
|
-
deleteMailbox: (request: Readonly<ClassicMailApiDeleteMailboxRequest>) => Promise<Mailbox>;
|
|
160
|
-
/**
|
|
161
|
-
* Update the mailbox within your hosting plan.. Update the mailbox within
|
|
162
|
-
* your hosting plan.
|
|
163
|
-
*
|
|
164
|
-
* @param request - The request {@link ClassicMailApiUpdateMailboxRequest}
|
|
165
|
-
* @returns A Promise of Mailbox
|
|
166
|
-
*/
|
|
167
|
-
updateMailbox: (request: Readonly<ClassicMailApiUpdateMailboxRequest>) => Promise<Mailbox>;
|
|
168
|
-
}
|
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
import { waitForResource } from "../../../internal/async/interval-retrier.js";
|
|
2
|
-
import { API as API$1 } from "../../../scw/api.js";
|
|
3
|
-
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
4
|
-
import "../../../vendor/base64/index.js";
|
|
5
|
-
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
|
-
import { HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { marshalCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalUpdateHostingRequest, unmarshalDnsRecords, marshalCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, unmarshalListOffersResponse, unmarshalListControlPanelsResponse, unmarshalSession, unmarshalResetHostingPasswordResponse, marshalClassicMailApiCreateMailboxRequest, unmarshalMailbox, unmarshalListMailboxesResponse, marshalClassicMailApiUpdateMailboxRequest } from "./marshalling.gen.js";
|
|
8
|
-
const jsonContentHeaders = {
|
|
9
|
-
"Content-Type": "application/json; charset=utf-8"
|
|
10
|
-
};
|
|
11
|
-
class API extends API$1 {
|
|
12
|
-
/** Lists the available regions of the API. */
|
|
13
|
-
static LOCALITIES = ["fr-par", "nl-ams"];
|
|
14
|
-
/**
|
|
15
|
-
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
|
|
16
|
-
* type required via the `offer_id` parameter.
|
|
17
|
-
*
|
|
18
|
-
* @param request - The request {@link CreateHostingRequest}
|
|
19
|
-
* @returns A Promise of Hosting
|
|
20
|
-
*/
|
|
21
|
-
createHosting = (request) => this.client.fetch(
|
|
22
|
-
{
|
|
23
|
-
body: JSON.stringify(
|
|
24
|
-
marshalCreateHostingRequest(request, this.client.settings)
|
|
25
|
-
),
|
|
26
|
-
headers: jsonContentHeaders,
|
|
27
|
-
method: "POST",
|
|
28
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings`
|
|
29
|
-
},
|
|
30
|
-
unmarshalHosting
|
|
31
|
-
);
|
|
32
|
-
pageOfListHostings = (request = {}) => this.client.fetch(
|
|
33
|
-
{
|
|
34
|
-
method: "GET",
|
|
35
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings`,
|
|
36
|
-
urlParams: urlParams(
|
|
37
|
-
["control_panels", request.controlPanels],
|
|
38
|
-
["domain", request.domain],
|
|
39
|
-
["order_by", request.orderBy],
|
|
40
|
-
["organization_id", request.organizationId],
|
|
41
|
-
["page", request.page],
|
|
42
|
-
[
|
|
43
|
-
"page_size",
|
|
44
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
45
|
-
],
|
|
46
|
-
["project_id", request.projectId],
|
|
47
|
-
["statuses", request.statuses],
|
|
48
|
-
["tags", request.tags]
|
|
49
|
-
)
|
|
50
|
-
},
|
|
51
|
-
unmarshalListHostingsResponse
|
|
52
|
-
);
|
|
53
|
-
/**
|
|
54
|
-
* List all Web Hosting plans. List all of your existing Web Hosting plans.
|
|
55
|
-
* Various filters are available to limit the results, including filtering by
|
|
56
|
-
* domain, status, tag and Project ID.
|
|
57
|
-
*
|
|
58
|
-
* @param request - The request {@link ListHostingsRequest}
|
|
59
|
-
* @returns A Promise of ListHostingsResponse
|
|
60
|
-
*/
|
|
61
|
-
listHostings = (request = {}) => enrichForPagination("hostings", this.pageOfListHostings, request);
|
|
62
|
-
/**
|
|
63
|
-
* Get a Web Hosting plan. Get the details of one of your existing Web Hosting
|
|
64
|
-
* plans, specified by its `hosting_id`.
|
|
65
|
-
*
|
|
66
|
-
* @param request - The request {@link GetHostingRequest}
|
|
67
|
-
* @returns A Promise of Hosting
|
|
68
|
-
*/
|
|
69
|
-
getHosting = (request) => this.client.fetch(
|
|
70
|
-
{
|
|
71
|
-
method: "GET",
|
|
72
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}`
|
|
73
|
-
},
|
|
74
|
-
unmarshalHosting
|
|
75
|
-
);
|
|
76
|
-
/**
|
|
77
|
-
* Waits for {@link Hosting} to be in a final state.
|
|
78
|
-
*
|
|
79
|
-
* @param request - The request {@link GetHostingRequest}
|
|
80
|
-
* @param options - The waiting options
|
|
81
|
-
* @returns A Promise of Hosting
|
|
82
|
-
*/
|
|
83
|
-
waitForHosting = (request, options) => waitForResource(
|
|
84
|
-
options?.stop ?? ((res) => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))),
|
|
85
|
-
this.getHosting,
|
|
86
|
-
request,
|
|
87
|
-
options
|
|
88
|
-
);
|
|
89
|
-
/**
|
|
90
|
-
* Update a Web Hosting plan. Update the details of one of your existing Web
|
|
91
|
-
* Hosting plans, specified by its `hosting_id`. You can update parameters
|
|
92
|
-
* including the contact email address, tags, options and offer.
|
|
93
|
-
*
|
|
94
|
-
* @param request - The request {@link UpdateHostingRequest}
|
|
95
|
-
* @returns A Promise of Hosting
|
|
96
|
-
*/
|
|
97
|
-
updateHosting = (request) => this.client.fetch(
|
|
98
|
-
{
|
|
99
|
-
body: JSON.stringify(
|
|
100
|
-
marshalUpdateHostingRequest(request, this.client.settings)
|
|
101
|
-
),
|
|
102
|
-
headers: jsonContentHeaders,
|
|
103
|
-
method: "PATCH",
|
|
104
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}`
|
|
105
|
-
},
|
|
106
|
-
unmarshalHosting
|
|
107
|
-
);
|
|
108
|
-
/**
|
|
109
|
-
* Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its
|
|
110
|
-
* `hosting_id`. Note that deletion is not immediate: it will take place at
|
|
111
|
-
* the end of the calendar month, after which time your Web Hosting plan and
|
|
112
|
-
* all its data (files and emails) will be irreversibly lost.
|
|
113
|
-
*
|
|
114
|
-
* @param request - The request {@link DeleteHostingRequest}
|
|
115
|
-
* @returns A Promise of Hosting
|
|
116
|
-
*/
|
|
117
|
-
deleteHosting = (request) => this.client.fetch(
|
|
118
|
-
{
|
|
119
|
-
method: "DELETE",
|
|
120
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}`
|
|
121
|
-
},
|
|
122
|
-
unmarshalHosting
|
|
123
|
-
);
|
|
124
|
-
/**
|
|
125
|
-
* Restore a Web Hosting plan. When you [delete a Web Hosting
|
|
126
|
-
* plan](#path-hostings-delete-a-hosting), definitive deletion does not take
|
|
127
|
-
* place until the end of the calendar month. In the time between initiating
|
|
128
|
-
* the deletion, and definitive deletion at the end of the month, you can
|
|
129
|
-
* choose to **restore** the Web Hosting plan, using this endpoint and
|
|
130
|
-
* specifying its `hosting_id`.
|
|
131
|
-
*
|
|
132
|
-
* @param request - The request {@link RestoreHostingRequest}
|
|
133
|
-
* @returns A Promise of Hosting
|
|
134
|
-
*/
|
|
135
|
-
restoreHosting = (request) => this.client.fetch(
|
|
136
|
-
{
|
|
137
|
-
body: "{}",
|
|
138
|
-
headers: jsonContentHeaders,
|
|
139
|
-
method: "POST",
|
|
140
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/restore`
|
|
141
|
-
},
|
|
142
|
-
unmarshalHosting
|
|
143
|
-
);
|
|
144
|
-
/**
|
|
145
|
-
* Get DNS records. Get the set of DNS records of a specified domain
|
|
146
|
-
* associated with a Web Hosting plan.
|
|
147
|
-
*
|
|
148
|
-
* @param request - The request {@link GetDomainDnsRecordsRequest}
|
|
149
|
-
* @returns A Promise of DnsRecords
|
|
150
|
-
*/
|
|
151
|
-
getDomainDnsRecords = (request) => this.client.fetch(
|
|
152
|
-
{
|
|
153
|
-
method: "GET",
|
|
154
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/dns-records`
|
|
155
|
-
},
|
|
156
|
-
unmarshalDnsRecords
|
|
157
|
-
);
|
|
158
|
-
/**
|
|
159
|
-
* "Check whether you own this domain or not.".
|
|
160
|
-
*
|
|
161
|
-
* @param request - The request {@link CheckUserOwnsDomainRequest}
|
|
162
|
-
* @returns A Promise of CheckUserOwnsDomainResponse
|
|
163
|
-
*/
|
|
164
|
-
checkUserOwnsDomain = (request) => this.client.fetch(
|
|
165
|
-
{
|
|
166
|
-
body: JSON.stringify(
|
|
167
|
-
marshalCheckUserOwnsDomainRequest(request, this.client.settings)
|
|
168
|
-
),
|
|
169
|
-
headers: jsonContentHeaders,
|
|
170
|
-
method: "POST",
|
|
171
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/check-ownership`
|
|
172
|
-
},
|
|
173
|
-
unmarshalCheckUserOwnsDomainResponse
|
|
174
|
-
);
|
|
175
|
-
/**
|
|
176
|
-
* List all offers. List the different Web Hosting offers, and their options,
|
|
177
|
-
* available to order from Scaleway.
|
|
178
|
-
*
|
|
179
|
-
* @param request - The request {@link ListOffersRequest}
|
|
180
|
-
* @returns A Promise of ListOffersResponse
|
|
181
|
-
*/
|
|
182
|
-
listOffers = (request) => this.client.fetch(
|
|
183
|
-
{
|
|
184
|
-
method: "GET",
|
|
185
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/offers`,
|
|
186
|
-
urlParams: urlParams(
|
|
187
|
-
["control_panels", request.controlPanels],
|
|
188
|
-
["hosting_id", request.hostingId],
|
|
189
|
-
["only_options", request.onlyOptions],
|
|
190
|
-
["order_by", request.orderBy],
|
|
191
|
-
["without_options", request.withoutOptions]
|
|
192
|
-
)
|
|
193
|
-
},
|
|
194
|
-
unmarshalListOffersResponse
|
|
195
|
-
);
|
|
196
|
-
pageOfListControlPanels = (request = {}) => this.client.fetch(
|
|
197
|
-
{
|
|
198
|
-
method: "GET",
|
|
199
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/control-panels`,
|
|
200
|
-
urlParams: urlParams(
|
|
201
|
-
["page", request.page],
|
|
202
|
-
[
|
|
203
|
-
"page_size",
|
|
204
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
205
|
-
]
|
|
206
|
-
)
|
|
207
|
-
},
|
|
208
|
-
unmarshalListControlPanelsResponse
|
|
209
|
-
);
|
|
210
|
-
/**
|
|
211
|
-
* "List the control panels type: cpanel or plesk.".
|
|
212
|
-
*
|
|
213
|
-
* @param request - The request {@link ListControlPanelsRequest}
|
|
214
|
-
* @returns A Promise of ListControlPanelsResponse
|
|
215
|
-
*/
|
|
216
|
-
listControlPanels = (request = {}) => enrichForPagination("controlPanels", this.pageOfListControlPanels, request);
|
|
217
|
-
/**
|
|
218
|
-
* Create a user session.
|
|
219
|
-
*
|
|
220
|
-
* @param request - The request {@link CreateSessionRequest}
|
|
221
|
-
* @returns A Promise of Session
|
|
222
|
-
*/
|
|
223
|
-
createSession = (request) => this.client.fetch(
|
|
224
|
-
{
|
|
225
|
-
body: "{}",
|
|
226
|
-
headers: jsonContentHeaders,
|
|
227
|
-
method: "POST",
|
|
228
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/sessions`
|
|
229
|
-
},
|
|
230
|
-
unmarshalSession
|
|
231
|
-
);
|
|
232
|
-
resetHostingPassword = (request) => this.client.fetch(
|
|
233
|
-
{
|
|
234
|
-
body: "{}",
|
|
235
|
-
headers: jsonContentHeaders,
|
|
236
|
-
method: "POST",
|
|
237
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/reset-password`
|
|
238
|
-
},
|
|
239
|
-
unmarshalResetHostingPasswordResponse
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
class ClassicMailAPI extends API$1 {
|
|
243
|
-
/** Lists the available regions of the API. */
|
|
244
|
-
static LOCALITIES = [
|
|
245
|
-
"fr-par",
|
|
246
|
-
"nl-ams",
|
|
247
|
-
"pl-waw"
|
|
248
|
-
];
|
|
249
|
-
/**
|
|
250
|
-
* Create a new mailbox within your hosting plan.. Create a new mailbox within
|
|
251
|
-
* your hosting plan.
|
|
252
|
-
*
|
|
253
|
-
* @param request - The request {@link ClassicMailApiCreateMailboxRequest}
|
|
254
|
-
* @returns A Promise of Mailbox
|
|
255
|
-
*/
|
|
256
|
-
createMailbox = (request) => this.client.fetch(
|
|
257
|
-
{
|
|
258
|
-
body: JSON.stringify(
|
|
259
|
-
marshalClassicMailApiCreateMailboxRequest(
|
|
260
|
-
request,
|
|
261
|
-
this.client.settings
|
|
262
|
-
)
|
|
263
|
-
),
|
|
264
|
-
headers: jsonContentHeaders,
|
|
265
|
-
method: "POST",
|
|
266
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${validatePathParam("onlineId", request.onlineId)}/mailboxes`
|
|
267
|
-
},
|
|
268
|
-
unmarshalMailbox
|
|
269
|
-
);
|
|
270
|
-
/**
|
|
271
|
-
* Get a mailbox by id within your hosting plan.. Get a mailbox by id within
|
|
272
|
-
* your hosting plan.
|
|
273
|
-
*
|
|
274
|
-
* @param request - The request {@link ClassicMailApiGetMailboxRequest}
|
|
275
|
-
* @returns A Promise of Mailbox
|
|
276
|
-
*/
|
|
277
|
-
getMailbox = (request) => this.client.fetch(
|
|
278
|
-
{
|
|
279
|
-
method: "GET",
|
|
280
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${validatePathParam("onlineId", request.onlineId)}/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}`
|
|
281
|
-
},
|
|
282
|
-
unmarshalMailbox
|
|
283
|
-
);
|
|
284
|
-
pageOfListMailboxes = (request) => this.client.fetch(
|
|
285
|
-
{
|
|
286
|
-
method: "GET",
|
|
287
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${validatePathParam("onlineId", request.onlineId)}/mailboxes`,
|
|
288
|
-
urlParams: urlParams(
|
|
289
|
-
["domain", request.domain],
|
|
290
|
-
["page", request.page],
|
|
291
|
-
[
|
|
292
|
-
"page_size",
|
|
293
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
294
|
-
]
|
|
295
|
-
)
|
|
296
|
-
},
|
|
297
|
-
unmarshalListMailboxesResponse
|
|
298
|
-
);
|
|
299
|
-
/**
|
|
300
|
-
* List all mailboxes within your hosting plan.. List all mailboxes within
|
|
301
|
-
* your hosting plan.
|
|
302
|
-
*
|
|
303
|
-
* @param request - The request {@link ClassicMailApiListMailboxesRequest}
|
|
304
|
-
* @returns A Promise of ListMailboxesResponse
|
|
305
|
-
*/
|
|
306
|
-
listMailboxes = (request) => enrichForPagination("mailboxes", this.pageOfListMailboxes, request);
|
|
307
|
-
deleteMailbox = (request) => this.client.fetch(
|
|
308
|
-
{
|
|
309
|
-
method: "DELETE",
|
|
310
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${validatePathParam("onlineId", request.onlineId)}/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}`
|
|
311
|
-
},
|
|
312
|
-
unmarshalMailbox
|
|
313
|
-
);
|
|
314
|
-
/**
|
|
315
|
-
* Update the mailbox within your hosting plan.. Update the mailbox within
|
|
316
|
-
* your hosting plan.
|
|
317
|
-
*
|
|
318
|
-
* @param request - The request {@link ClassicMailApiUpdateMailboxRequest}
|
|
319
|
-
* @returns A Promise of Mailbox
|
|
320
|
-
*/
|
|
321
|
-
updateMailbox = (request) => this.client.fetch(
|
|
322
|
-
{
|
|
323
|
-
body: JSON.stringify(
|
|
324
|
-
marshalClassicMailApiUpdateMailboxRequest(
|
|
325
|
-
request,
|
|
326
|
-
this.client.settings
|
|
327
|
-
)
|
|
328
|
-
),
|
|
329
|
-
headers: jsonContentHeaders,
|
|
330
|
-
method: "PATCH",
|
|
331
|
-
path: `/webhosting/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${validatePathParam("onlineId", request.onlineId)}/mailboxes/${validatePathParam("mailboxId", request.mailboxId)}`
|
|
332
|
-
},
|
|
333
|
-
unmarshalMailbox
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
export {
|
|
337
|
-
API,
|
|
338
|
-
ClassicMailAPI
|
|
339
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { API, ClassicMailAPI } from './api.gen.js';
|
|
2
|
-
export * from './content.gen.js';
|
|
3
|
-
export type { CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, ClassicMailApiCreateMailboxRequest, ClassicMailApiDeleteMailboxRequest, ClassicMailApiGetMailboxRequest, ClassicMailApiListMailboxesRequest, ClassicMailApiUpdateMailboxRequest, ControlPanel, CreateHostingRequest, CreateHostingRequestDomainConfiguration, CreateSessionRequest, DeleteHostingRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, EmailAddress, GetDomainDnsRecordsRequest, GetHostingRequest, Hosting, HostingCpanelUrls, HostingDnsStatus, HostingOption, HostingStatus, ListControlPanelsRequest, ListControlPanelsResponse, ListHostingsRequest, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailboxesResponse, ListOffersRequest, ListOffersRequestOrderBy, ListOffersResponse, Mailbox, Nameserver, NameserverStatus, Offer, OfferProduct, OfferQuotaWarning, ResetHostingPasswordRequest, ResetHostingPasswordResponse, RestoreHostingRequest, Session, UpdateHostingRequest, } from './types.gen';
|
|
4
|
-
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { API, ClassicMailAPI } from "./api.gen.js";
|
|
2
|
-
import { HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import * as validationRules_gen from "./validation-rules.gen.js";
|
|
4
|
-
export {
|
|
5
|
-
API,
|
|
6
|
-
ClassicMailAPI,
|
|
7
|
-
HOSTING_TRANSIENT_STATUSES,
|
|
8
|
-
validationRules_gen as ValidationRules
|
|
9
|
-
};
|