@scaleway/sdk 2.49.0 → 2.50.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/baremetal/index.gen.cjs +2 -0
- package/dist/api/baremetal/index.gen.d.ts +1 -0
- package/dist/api/baremetal/index.gen.js +3 -1
- package/dist/api/baremetal/v3/api.gen.cjs +109 -0
- package/dist/api/baremetal/v3/api.gen.d.ts +46 -0
- package/dist/api/baremetal/v3/api.gen.js +109 -0
- package/dist/api/baremetal/v3/content.gen.cjs +4 -0
- package/dist/api/baremetal/v3/content.gen.d.ts +3 -0
- package/dist/api/baremetal/v3/content.gen.js +4 -0
- package/dist/api/baremetal/v3/index.gen.cjs +6 -0
- package/dist/api/baremetal/v3/index.gen.d.ts +3 -0
- package/dist/api/baremetal/v3/index.gen.js +6 -0
- package/dist/api/baremetal/v3/marshalling.gen.cjs +62 -0
- package/dist/api/baremetal/v3/marshalling.gen.d.ts +7 -0
- package/dist/api/baremetal/v3/marshalling.gen.js +62 -0
- package/dist/api/baremetal/v3/types.gen.d.ts +82 -0
- package/dist/api/dedibox/v1/types.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/api.gen.cjs +14 -0
- package/dist/api/edge_services/v1alpha1/api.gen.d.ts +9 -1
- package/dist/api/edge_services/v1alpha1/api.gen.js +15 -1
- package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +31 -13
- package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/edge_services/v1alpha1/marshalling.gen.js +31 -13
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +28 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +8 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +8 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +16 -0
- package/dist/api/jobs/v1alpha1/api.gen.cjs +46 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +6 -1
- package/dist/api/jobs/v1alpha1/api.gen.js +47 -1
- package/dist/api/jobs/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +80 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +6 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +81 -1
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +81 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.cjs +12 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.d.ts +10 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.js +13 -1
- package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +13 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +13 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +13 -2
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
import randomName from "@scaleway/random-name";
|
|
2
2
|
import { isJSONObject } from "../../../helpers/json.js";
|
|
3
|
-
import { unmarshalDate, unmarshalArrayOfObject } from "../../../helpers/marshalling.js";
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
|
+
const unmarshalSecretEnvVar = (data) => {
|
|
6
|
+
if (!isJSONObject(data)) {
|
|
7
|
+
throw new TypeError(
|
|
8
|
+
`Unmarshalling the type 'SecretEnvVar' failed as data isn't a dictionary.`
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
name: data.name
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
const unmarshalSecretFile = (data) => {
|
|
16
|
+
if (!isJSONObject(data)) {
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`Unmarshalling the type 'SecretFile' failed as data isn't a dictionary.`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
path: data.path
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const unmarshalSecret = (data) => {
|
|
26
|
+
if (!isJSONObject(data)) {
|
|
27
|
+
throw new TypeError(
|
|
28
|
+
`Unmarshalling the type 'Secret' failed as data isn't a dictionary.`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
envVar: data.env_var ? unmarshalSecretEnvVar(data.env_var) : void 0,
|
|
33
|
+
file: data.file ? unmarshalSecretFile(data.file) : void 0,
|
|
34
|
+
secretId: data.secret_id,
|
|
35
|
+
secretManagerId: data.secret_manager_id,
|
|
36
|
+
secretManagerVersion: data.secret_manager_version
|
|
37
|
+
};
|
|
38
|
+
};
|
|
5
39
|
const unmarshalCronSchedule = (data) => {
|
|
6
40
|
if (!isJSONObject(data)) {
|
|
7
41
|
throw new TypeError(
|
|
@@ -62,6 +96,27 @@ const unmarshalJobRun = (data) => {
|
|
|
62
96
|
updatedAt: unmarshalDate(data.updated_at)
|
|
63
97
|
};
|
|
64
98
|
};
|
|
99
|
+
const unmarshalCreateJobDefinitionSecretsResponse = (data) => {
|
|
100
|
+
if (!isJSONObject(data)) {
|
|
101
|
+
throw new TypeError(
|
|
102
|
+
`Unmarshalling the type 'CreateJobDefinitionSecretsResponse' failed as data isn't a dictionary.`
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret)
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
const unmarshalListJobDefinitionSecretsResponse = (data) => {
|
|
110
|
+
if (!isJSONObject(data)) {
|
|
111
|
+
throw new TypeError(
|
|
112
|
+
`Unmarshalling the type 'ListJobDefinitionSecretsResponse' failed as data isn't a dictionary.`
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
secrets: unmarshalArrayOfObject(data.secrets, unmarshalSecret),
|
|
117
|
+
totalCount: data.total_count
|
|
118
|
+
};
|
|
119
|
+
};
|
|
65
120
|
const unmarshalListJobDefinitionsResponse = (data) => {
|
|
66
121
|
if (!isJSONObject(data)) {
|
|
67
122
|
throw new TypeError(
|
|
@@ -137,6 +192,19 @@ const marshalCreateJobDefinitionRequest = (request, defaults) => ({
|
|
|
137
192
|
name: request.name || randomName("job"),
|
|
138
193
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
139
194
|
});
|
|
195
|
+
const marshalCreateJobDefinitionSecretsRequestSecretConfig = (request, defaults) => ({
|
|
196
|
+
secret_manager_id: request.secretManagerId,
|
|
197
|
+
secret_manager_version: request.secretManagerVersion,
|
|
198
|
+
...resolveOneOf([
|
|
199
|
+
{ param: "path", value: request.path },
|
|
200
|
+
{ param: "env_var_name", value: request.envVarName }
|
|
201
|
+
])
|
|
202
|
+
});
|
|
203
|
+
const marshalCreateJobDefinitionSecretsRequest = (request, defaults) => ({
|
|
204
|
+
secrets: request.secrets.map(
|
|
205
|
+
(elt) => marshalCreateJobDefinitionSecretsRequestSecretConfig(elt)
|
|
206
|
+
)
|
|
207
|
+
});
|
|
140
208
|
const marshalStartJobDefinitionRequest = (request, defaults) => ({
|
|
141
209
|
command: request.command,
|
|
142
210
|
environment_variables: request.environmentVariables,
|
|
@@ -160,14 +228,26 @@ const marshalUpdateJobDefinitionRequest = (request, defaults) => ({
|
|
|
160
228
|
memory_limit: request.memoryLimit,
|
|
161
229
|
name: request.name
|
|
162
230
|
});
|
|
231
|
+
const marshalUpdateJobDefinitionSecretRequest = (request, defaults) => ({
|
|
232
|
+
secret_manager_version: request.secretManagerVersion,
|
|
233
|
+
...resolveOneOf([
|
|
234
|
+
{ param: "path", value: request.path },
|
|
235
|
+
{ param: "env_var_name", value: request.envVarName }
|
|
236
|
+
])
|
|
237
|
+
});
|
|
163
238
|
export {
|
|
164
239
|
marshalCreateJobDefinitionRequest,
|
|
240
|
+
marshalCreateJobDefinitionSecretsRequest,
|
|
165
241
|
marshalStartJobDefinitionRequest,
|
|
166
242
|
marshalUpdateJobDefinitionRequest,
|
|
243
|
+
marshalUpdateJobDefinitionSecretRequest,
|
|
244
|
+
unmarshalCreateJobDefinitionSecretsResponse,
|
|
167
245
|
unmarshalJobDefinition,
|
|
168
246
|
unmarshalJobRun,
|
|
247
|
+
unmarshalListJobDefinitionSecretsResponse,
|
|
169
248
|
unmarshalListJobDefinitionsResponse,
|
|
170
249
|
unmarshalListJobRunsResponse,
|
|
171
250
|
unmarshalListJobsResourcesResponse,
|
|
251
|
+
unmarshalSecret,
|
|
172
252
|
unmarshalStartJobDefinitionResponse
|
|
173
253
|
};
|
|
@@ -2,6 +2,12 @@ import type { Region } from '../../../bridge';
|
|
|
2
2
|
export type JobRunState = 'unknown_state' | 'queued' | 'scheduled' | 'running' | 'succeeded' | 'failed' | 'canceled' | 'internal_error';
|
|
3
3
|
export type ListJobDefinitionsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
4
4
|
export type ListJobRunsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
5
|
+
export interface SecretEnvVar {
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SecretFile {
|
|
9
|
+
path: string;
|
|
10
|
+
}
|
|
5
11
|
export interface CronSchedule {
|
|
6
12
|
/** UNIX cron schedule to run job (e.g., '* * * * *'). */
|
|
7
13
|
schedule: string;
|
|
@@ -15,6 +21,23 @@ export interface CreateJobDefinitionRequestCronScheduleConfig {
|
|
|
15
21
|
schedule: string;
|
|
16
22
|
timezone: string;
|
|
17
23
|
}
|
|
24
|
+
export interface CreateJobDefinitionSecretsRequestSecretConfig {
|
|
25
|
+
secretManagerId: string;
|
|
26
|
+
secretManagerVersion: string;
|
|
27
|
+
/** One-of ('pathOrEnvVar'): at most one of 'path', 'envVarName' could be set. */
|
|
28
|
+
path?: string;
|
|
29
|
+
/** One-of ('pathOrEnvVar'): at most one of 'path', 'envVarName' could be set. */
|
|
30
|
+
envVarName?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Secret {
|
|
33
|
+
secretId: string;
|
|
34
|
+
secretManagerId: string;
|
|
35
|
+
secretManagerVersion: string;
|
|
36
|
+
/** One-of ('secretConfig'): at most one of 'file', 'envVar' could be set. */
|
|
37
|
+
file?: SecretFile;
|
|
38
|
+
/** One-of ('secretConfig'): at most one of 'file', 'envVar' could be set. */
|
|
39
|
+
envVar?: SecretEnvVar;
|
|
40
|
+
}
|
|
18
41
|
export interface JobDefinition {
|
|
19
42
|
id: string;
|
|
20
43
|
name: string;
|
|
@@ -98,6 +121,20 @@ export type CreateJobDefinitionRequest = {
|
|
|
98
121
|
/** Configure a cron for the job. */
|
|
99
122
|
cronSchedule?: CreateJobDefinitionRequestCronScheduleConfig;
|
|
100
123
|
};
|
|
124
|
+
export type CreateJobDefinitionSecretsRequest = {
|
|
125
|
+
/**
|
|
126
|
+
* Region to target. If none is passed will use default region from the
|
|
127
|
+
* config.
|
|
128
|
+
*/
|
|
129
|
+
region?: Region;
|
|
130
|
+
/** UUID of the job definition to get. */
|
|
131
|
+
jobDefinitionId: string;
|
|
132
|
+
/** Secrets to inject into the job. */
|
|
133
|
+
secrets: CreateJobDefinitionSecretsRequestSecretConfig[];
|
|
134
|
+
};
|
|
135
|
+
export interface CreateJobDefinitionSecretsResponse {
|
|
136
|
+
secrets: Secret[];
|
|
137
|
+
}
|
|
101
138
|
export type DeleteJobDefinitionRequest = {
|
|
102
139
|
/**
|
|
103
140
|
* Region to target. If none is passed will use default region from the
|
|
@@ -107,6 +144,15 @@ export type DeleteJobDefinitionRequest = {
|
|
|
107
144
|
/** UUID of the job definition to delete. */
|
|
108
145
|
jobDefinitionId: string;
|
|
109
146
|
};
|
|
147
|
+
export type DeleteJobDefinitionSecretRequest = {
|
|
148
|
+
/**
|
|
149
|
+
* Region to target. If none is passed will use default region from the
|
|
150
|
+
* config.
|
|
151
|
+
*/
|
|
152
|
+
region?: Region;
|
|
153
|
+
jobDefinitionId: string;
|
|
154
|
+
secretId: string;
|
|
155
|
+
};
|
|
110
156
|
export type GetJobDefinitionRequest = {
|
|
111
157
|
/**
|
|
112
158
|
* Region to target. If none is passed will use default region from the
|
|
@@ -116,6 +162,15 @@ export type GetJobDefinitionRequest = {
|
|
|
116
162
|
/** UUID of the job definition to get. */
|
|
117
163
|
jobDefinitionId: string;
|
|
118
164
|
};
|
|
165
|
+
export type GetJobDefinitionSecretRequest = {
|
|
166
|
+
/**
|
|
167
|
+
* Region to target. If none is passed will use default region from the
|
|
168
|
+
* config.
|
|
169
|
+
*/
|
|
170
|
+
region?: Region;
|
|
171
|
+
jobDefinitionId: string;
|
|
172
|
+
secretId: string;
|
|
173
|
+
};
|
|
119
174
|
export type GetJobRunRequest = {
|
|
120
175
|
/**
|
|
121
176
|
* Region to target. If none is passed will use default region from the
|
|
@@ -125,6 +180,18 @@ export type GetJobRunRequest = {
|
|
|
125
180
|
/** UUID of the job run to get. */
|
|
126
181
|
jobRunId: string;
|
|
127
182
|
};
|
|
183
|
+
export type ListJobDefinitionSecretsRequest = {
|
|
184
|
+
/**
|
|
185
|
+
* Region to target. If none is passed will use default region from the
|
|
186
|
+
* config.
|
|
187
|
+
*/
|
|
188
|
+
region?: Region;
|
|
189
|
+
jobDefinitionId: string;
|
|
190
|
+
};
|
|
191
|
+
export interface ListJobDefinitionSecretsResponse {
|
|
192
|
+
secrets: Secret[];
|
|
193
|
+
totalCount: number;
|
|
194
|
+
}
|
|
128
195
|
export type ListJobDefinitionsRequest = {
|
|
129
196
|
/**
|
|
130
197
|
* Region to target. If none is passed will use default region from the
|
|
@@ -223,3 +290,17 @@ export type UpdateJobDefinitionRequest = {
|
|
|
223
290
|
jobTimeout?: string;
|
|
224
291
|
cronSchedule?: UpdateJobDefinitionRequestCronScheduleConfig;
|
|
225
292
|
};
|
|
293
|
+
export type UpdateJobDefinitionSecretRequest = {
|
|
294
|
+
/**
|
|
295
|
+
* Region to target. If none is passed will use default region from the
|
|
296
|
+
* config.
|
|
297
|
+
*/
|
|
298
|
+
region?: Region;
|
|
299
|
+
jobDefinitionId: string;
|
|
300
|
+
secretId: string;
|
|
301
|
+
secretManagerVersion?: string;
|
|
302
|
+
/** One-of ('secretConfig'): at most one of 'path', 'envVarName' could be set. */
|
|
303
|
+
path?: string;
|
|
304
|
+
/** One-of ('secretConfig'): at most one of 'path', 'envVarName' could be set. */
|
|
305
|
+
envVarName?: string;
|
|
306
|
+
};
|
|
@@ -27,6 +27,11 @@ const CreateJobDefinitionRequestCronScheduleConfig = {
|
|
|
27
27
|
minLength: 1
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
+
const CreateJobDefinitionSecretsRequestSecretConfig = {
|
|
31
|
+
secretManagerVersion: {
|
|
32
|
+
minLength: 1
|
|
33
|
+
}
|
|
34
|
+
};
|
|
30
35
|
const CronSchedule = {
|
|
31
36
|
schedule: {
|
|
32
37
|
maxLength: 255,
|
|
@@ -87,11 +92,18 @@ const UpdateJobDefinitionRequestCronScheduleConfig = {
|
|
|
87
92
|
minLength: 1
|
|
88
93
|
}
|
|
89
94
|
};
|
|
95
|
+
const UpdateJobDefinitionSecretRequest = {
|
|
96
|
+
secretManagerVersion: {
|
|
97
|
+
minLength: 1
|
|
98
|
+
}
|
|
99
|
+
};
|
|
90
100
|
exports.CreateJobDefinitionRequest = CreateJobDefinitionRequest;
|
|
91
101
|
exports.CreateJobDefinitionRequestCronScheduleConfig = CreateJobDefinitionRequestCronScheduleConfig;
|
|
102
|
+
exports.CreateJobDefinitionSecretsRequestSecretConfig = CreateJobDefinitionSecretsRequestSecretConfig;
|
|
92
103
|
exports.CronSchedule = CronSchedule;
|
|
93
104
|
exports.ListJobDefinitionsRequest = ListJobDefinitionsRequest;
|
|
94
105
|
exports.ListJobRunsRequest = ListJobRunsRequest;
|
|
95
106
|
exports.StartJobDefinitionRequest = StartJobDefinitionRequest;
|
|
96
107
|
exports.UpdateJobDefinitionRequest = UpdateJobDefinitionRequest;
|
|
97
108
|
exports.UpdateJobDefinitionRequestCronScheduleConfig = UpdateJobDefinitionRequestCronScheduleConfig;
|
|
109
|
+
exports.UpdateJobDefinitionSecretRequest = UpdateJobDefinitionSecretRequest;
|
|
@@ -25,6 +25,11 @@ export declare const CreateJobDefinitionRequestCronScheduleConfig: {
|
|
|
25
25
|
minLength: number;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
export declare const CreateJobDefinitionSecretsRequestSecretConfig: {
|
|
29
|
+
secretManagerVersion: {
|
|
30
|
+
minLength: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
28
33
|
export declare const CronSchedule: {
|
|
29
34
|
schedule: {
|
|
30
35
|
maxLength: number;
|
|
@@ -85,3 +90,8 @@ export declare const UpdateJobDefinitionRequestCronScheduleConfig: {
|
|
|
85
90
|
minLength: number;
|
|
86
91
|
};
|
|
87
92
|
};
|
|
93
|
+
export declare const UpdateJobDefinitionSecretRequest: {
|
|
94
|
+
secretManagerVersion: {
|
|
95
|
+
minLength: number;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
@@ -25,6 +25,11 @@ const CreateJobDefinitionRequestCronScheduleConfig = {
|
|
|
25
25
|
minLength: 1
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
+
const CreateJobDefinitionSecretsRequestSecretConfig = {
|
|
29
|
+
secretManagerVersion: {
|
|
30
|
+
minLength: 1
|
|
31
|
+
}
|
|
32
|
+
};
|
|
28
33
|
const CronSchedule = {
|
|
29
34
|
schedule: {
|
|
30
35
|
maxLength: 255,
|
|
@@ -85,13 +90,20 @@ const UpdateJobDefinitionRequestCronScheduleConfig = {
|
|
|
85
90
|
minLength: 1
|
|
86
91
|
}
|
|
87
92
|
};
|
|
93
|
+
const UpdateJobDefinitionSecretRequest = {
|
|
94
|
+
secretManagerVersion: {
|
|
95
|
+
minLength: 1
|
|
96
|
+
}
|
|
97
|
+
};
|
|
88
98
|
export {
|
|
89
99
|
CreateJobDefinitionRequest,
|
|
90
100
|
CreateJobDefinitionRequestCronScheduleConfig,
|
|
101
|
+
CreateJobDefinitionSecretsRequestSecretConfig,
|
|
91
102
|
CronSchedule,
|
|
92
103
|
ListJobDefinitionsRequest,
|
|
93
104
|
ListJobRunsRequest,
|
|
94
105
|
StartJobDefinitionRequest,
|
|
95
106
|
UpdateJobDefinitionRequest,
|
|
96
|
-
UpdateJobDefinitionRequestCronScheduleConfig
|
|
107
|
+
UpdateJobDefinitionRequestCronScheduleConfig,
|
|
108
|
+
UpdateJobDefinitionSecretRequest
|
|
97
109
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailRequestAddress, CreateEmailRequestAttachment, CreateEmailRequestHeader, CreateEmailResponse, CreateWebhookRequest, DeleteWebhookRequest, Domain, DomainLastStatus, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusRecordStatus, DomainLastStatusSpfRecord, DomainRecords, DomainRecordsDMARC, DomainReputation, DomainReputationStatus, DomainStatistics, DomainStatus, Email, EmailFlag, EmailRcptType, EmailStatus, EmailTry, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetProjectSettingsRequest, GetStatisticsRequest, GetWebhookRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsRequestOrderBy, ListEmailsResponse, ListWebhookEventsRequest, ListWebhookEventsRequestOrderBy, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksRequestOrderBy, ListWebhooksResponse, ProjectSettings, ProjectSettingsPeriodicReport, ProjectSettingsPeriodicReportFrequency, RevokeDomainRequest, Statistics, UpdateDomainRequest, UpdateProjectSettingsRequest, UpdateProjectSettingsRequestUpdatePeriodicReport, UpdateWebhookRequest, Webhook, WebhookEvent, WebhookEventStatus, WebhookEventType, } from './types.gen';
|
|
3
|
+
export type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailRequestAddress, CreateEmailRequestAttachment, CreateEmailRequestHeader, CreateEmailResponse, CreateWebhookRequest, DeleteWebhookRequest, Domain, DomainLastStatus, DomainLastStatusAutoconfigState, DomainLastStatusAutoconfigStateReason, DomainLastStatusDkimRecord, DomainLastStatusDmarcRecord, DomainLastStatusRecordStatus, DomainLastStatusSpfRecord, DomainRecords, DomainRecordsDMARC, DomainReputation, DomainReputationStatus, DomainStatistics, DomainStatus, Email, EmailFlag, EmailRcptType, EmailStatus, EmailTry, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetProjectSettingsRequest, GetStatisticsRequest, GetWebhookRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsRequestOrderBy, ListEmailsResponse, ListWebhookEventsRequest, ListWebhookEventsRequestOrderBy, ListWebhookEventsResponse, ListWebhooksRequest, ListWebhooksRequestOrderBy, ListWebhooksResponse, ProjectSettings, ProjectSettingsPeriodicReport, ProjectSettingsPeriodicReportFrequency, RevokeDomainRequest, Statistics, UpdateDomainRequest, UpdateProjectSettingsRequest, UpdateProjectSettingsRequestUpdatePeriodicReport, UpdateWebhookRequest, Webhook, WebhookEvent, WebhookEventStatus, WebhookEventType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -142,6 +142,18 @@ const unmarshalCreateEmailResponse = (data) => {
|
|
|
142
142
|
emails: marshalling.unmarshalArrayOfObject(data.emails, unmarshalEmail)
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
|
+
const unmarshalDomainLastStatusAutoconfigState = (data) => {
|
|
146
|
+
if (!json.isJSONObject(data)) {
|
|
147
|
+
throw new TypeError(
|
|
148
|
+
`Unmarshalling the type 'DomainLastStatusAutoconfigState' failed as data isn't a dictionary.`
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
autoconfigurable: data.autoconfigurable,
|
|
153
|
+
enabled: data.enabled,
|
|
154
|
+
reason: data.reason ? data.reason : void 0
|
|
155
|
+
};
|
|
156
|
+
};
|
|
145
157
|
const unmarshalDomainLastStatusDkimRecord = (data) => {
|
|
146
158
|
if (!json.isJSONObject(data)) {
|
|
147
159
|
throw new TypeError(
|
|
@@ -185,6 +197,7 @@ const unmarshalDomainLastStatus = (data) => {
|
|
|
185
197
|
);
|
|
186
198
|
}
|
|
187
199
|
return {
|
|
200
|
+
autoconfigState: data.autoconfig_state ? unmarshalDomainLastStatusAutoconfigState(data.autoconfig_state) : void 0,
|
|
188
201
|
dkimRecord: data.dkim_record ? unmarshalDomainLastStatusDkimRecord(data.dkim_record) : void 0,
|
|
189
202
|
dmarcRecord: data.dmarc_record ? unmarshalDomainLastStatusDmarcRecord(data.dmarc_record) : void 0,
|
|
190
203
|
domainId: data.domain_id,
|
|
@@ -140,6 +140,18 @@ const unmarshalCreateEmailResponse = (data) => {
|
|
|
140
140
|
emails: unmarshalArrayOfObject(data.emails, unmarshalEmail)
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
+
const unmarshalDomainLastStatusAutoconfigState = (data) => {
|
|
144
|
+
if (!isJSONObject(data)) {
|
|
145
|
+
throw new TypeError(
|
|
146
|
+
`Unmarshalling the type 'DomainLastStatusAutoconfigState' failed as data isn't a dictionary.`
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
autoconfigurable: data.autoconfigurable,
|
|
151
|
+
enabled: data.enabled,
|
|
152
|
+
reason: data.reason ? data.reason : void 0
|
|
153
|
+
};
|
|
154
|
+
};
|
|
143
155
|
const unmarshalDomainLastStatusDkimRecord = (data) => {
|
|
144
156
|
if (!isJSONObject(data)) {
|
|
145
157
|
throw new TypeError(
|
|
@@ -183,6 +195,7 @@ const unmarshalDomainLastStatus = (data) => {
|
|
|
183
195
|
);
|
|
184
196
|
}
|
|
185
197
|
return {
|
|
198
|
+
autoconfigState: data.autoconfig_state ? unmarshalDomainLastStatusAutoconfigState(data.autoconfig_state) : void 0,
|
|
186
199
|
dkimRecord: data.dkim_record ? unmarshalDomainLastStatusDkimRecord(data.dkim_record) : void 0,
|
|
187
200
|
dmarcRecord: data.dmarc_record ? unmarshalDomainLastStatusDmarcRecord(data.dmarc_record) : void 0,
|
|
188
201
|
domainId: data.domain_id,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Region } from '../../../bridge';
|
|
2
|
+
export type DomainLastStatusAutoconfigStateReason = 'unknown_reason' | 'permission_denied' | 'domain_not_found';
|
|
2
3
|
export type DomainLastStatusRecordStatus = 'unknown_record_status' | 'valid' | 'invalid' | 'not_found';
|
|
3
4
|
export type DomainReputationStatus = 'unknown_status' | 'excellent' | 'good' | 'average' | 'bad';
|
|
4
5
|
export type DomainStatus = 'unknown' | 'checked' | 'unchecked' | 'invalid' | 'locked' | 'revoked' | 'pending' | 'autoconfiguring';
|
|
@@ -114,6 +115,14 @@ export interface Email {
|
|
|
114
115
|
*/
|
|
115
116
|
flags: EmailFlag[];
|
|
116
117
|
}
|
|
118
|
+
export interface DomainLastStatusAutoconfigState {
|
|
119
|
+
/** Enable or disable the auto-configuration of domain DNS records. */
|
|
120
|
+
enabled: boolean;
|
|
121
|
+
/** Whether the domain can be auto-configured or not. */
|
|
122
|
+
autoconfigurable: boolean;
|
|
123
|
+
/** The reason that the domain cannot be auto-configurable. */
|
|
124
|
+
reason?: DomainLastStatusAutoconfigStateReason;
|
|
125
|
+
}
|
|
117
126
|
export interface DomainLastStatusDkimRecord {
|
|
118
127
|
/** Status of the DKIM record's configuration. */
|
|
119
128
|
status: DomainLastStatusRecordStatus;
|
|
@@ -240,9 +249,9 @@ export interface ProjectSettingsPeriodicReport {
|
|
|
240
249
|
export interface UpdateProjectSettingsRequestUpdatePeriodicReport {
|
|
241
250
|
/** (Optional) Enable or disable periodic report notifications. */
|
|
242
251
|
enabled?: boolean;
|
|
243
|
-
/** (Optional)
|
|
252
|
+
/** (Optional) Frequency at which you receive periodic report notifications. */
|
|
244
253
|
frequency?: ProjectSettingsPeriodicReportFrequency;
|
|
245
|
-
/** (Optional)
|
|
254
|
+
/** (Optional) Hour at which you receive periodic report notifications. */
|
|
246
255
|
sendingHour?: number;
|
|
247
256
|
/**
|
|
248
257
|
* (Optional) On which day you receive periodic report notifications (1-7
|
|
@@ -353,6 +362,8 @@ export interface DomainLastStatus {
|
|
|
353
362
|
dkimRecord?: DomainLastStatusDkimRecord;
|
|
354
363
|
/** The DMARC record verification data. */
|
|
355
364
|
dmarcRecord?: DomainLastStatusDmarcRecord;
|
|
365
|
+
/** The verification state of domain auto-configuration. */
|
|
366
|
+
autoconfigState?: DomainLastStatusAutoconfigState;
|
|
356
367
|
}
|
|
357
368
|
export type GetDomainLastStatusRequest = {
|
|
358
369
|
/**
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.49.1";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.49.1";
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "a483682cce73c1660c461ed1b9f418539a21db25"
|
|
43
43
|
}
|