@scaleway/sdk 2.27.0 → 2.29.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/account/v2/api.gen.d.ts +1 -1
- package/dist/api/account/v3/api.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +5 -1
- package/dist/api/baremetal/v1/api.gen.d.ts +1 -1
- package/dist/api/billing/v2alpha1/api.gen.d.ts +2 -1
- package/dist/api/billing/v2beta1/api.gen.d.ts +30 -5
- package/dist/api/block/v1alpha1/api.gen.d.ts +1 -1
- package/dist/api/cockpit/v1beta1/api.gen.d.ts +2 -3
- package/dist/api/container/v1beta1/api.gen.d.ts +5 -1
- package/dist/api/document_db/v1beta1/api.gen.d.ts +5 -1
- package/dist/api/domain/v2beta1/api.gen.d.ts +1 -1
- package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +6 -8
- package/dist/api/function/v1beta1/api.gen.d.ts +5 -1
- package/dist/api/iam/v1alpha1/api.gen.d.ts +6 -1
- package/dist/api/instance/v1/api.gen.d.ts +5 -1
- package/dist/api/iot/v1/api.gen.d.ts +1 -1
- package/dist/api/ipam/v1/api.gen.cjs +11 -1
- package/dist/api/ipam/v1/api.gen.d.ts +3 -2
- package/dist/api/ipam/v1/api.gen.js +12 -2
- package/dist/api/ipam/v1/index.gen.d.ts +1 -1
- package/dist/api/ipam/v1/marshalling.gen.cjs +4 -0
- package/dist/api/ipam/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/ipam/v1/marshalling.gen.js +4 -0
- package/dist/api/ipam/v1/types.gen.d.ts +21 -2
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +5 -1
- package/dist/api/k8s/v1/api.gen.d.ts +5 -1
- package/dist/api/lb/v1/api.gen.d.ts +1 -1
- package/dist/api/llm_inference/v1beta1/api.gen.d.ts +5 -1
- package/dist/api/marketplace/v2/api.gen.d.ts +6 -1
- package/dist/api/mnq/v1beta1/api.gen.d.ts +5 -3
- package/dist/api/rdb/v1/api.gen.d.ts +6 -1
- package/dist/api/rdb/v1/index.gen.d.ts +1 -1
- package/dist/api/rdb/v1/marshalling.gen.cjs +15 -0
- package/dist/api/rdb/v1/marshalling.gen.js +15 -0
- package/dist/api/rdb/v1/types.gen.d.ts +7 -0
- package/dist/api/redis/v1/api.gen.d.ts +5 -1
- package/dist/api/registry/v1/api.gen.d.ts +5 -1
- package/dist/api/secret/v1alpha1/api.gen.d.ts +3 -2
- package/dist/api/secret/v1beta1/api.gen.d.ts +3 -2
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +1 -1
- package/dist/api/tem/v1alpha1/api.gen.d.ts +5 -1
- package/dist/api/vpc/v1/api.gen.d.ts +6 -1
- package/dist/api/vpc/v2/api.gen.d.ts +6 -1
- package/dist/api/vpcgw/v1/api.gen.d.ts +5 -1
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +5 -1
- 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/custom-types.d.ts +65 -0
- package/dist/scw/errors/scw-error-from-json.d.ts +10 -0
- package/dist/scw/fetch/types.d.ts +16 -0
- package/dist/scw/locality.d.ts +2 -0
- package/node_modules/@scaleway/random-name/CHANGELOG.md +24 -0
- package/node_modules/@scaleway/random-name/dist/index.cjs +599 -0
- package/node_modules/@scaleway/random-name/dist/index.d.ts +1 -2
- package/node_modules/@scaleway/random-name/dist/index.js +595 -6
- package/node_modules/@scaleway/random-name/package.json +21 -6
- package/node_modules/@scaleway/random-name/tsconfig.build.json +16 -0
- package/node_modules/@scaleway/random-name/tsconfig.json +4 -0
- package/node_modules/@scaleway/random-name/vite.config.ts +10 -0
- package/package.json +3 -3
|
@@ -145,6 +145,16 @@ const unmarshalBackupSchedule = (data) => {
|
|
|
145
145
|
retention: data.retention
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
|
+
const unmarshalEncryptionAtRest = (data) => {
|
|
149
|
+
if (!json.isJSONObject(data)) {
|
|
150
|
+
throw new TypeError(
|
|
151
|
+
`Unmarshalling the type 'EncryptionAtRest' failed as data isn't a dictionary.`
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
enabled: data.enabled
|
|
156
|
+
};
|
|
157
|
+
};
|
|
148
158
|
const unmarshalInstanceSetting = (data) => {
|
|
149
159
|
if (!json.isJSONObject(data)) {
|
|
150
160
|
throw new TypeError(
|
|
@@ -202,6 +212,7 @@ const unmarshalInstance = (data) => {
|
|
|
202
212
|
backupSameRegion: data.backup_same_region,
|
|
203
213
|
backupSchedule: data.backup_schedule ? unmarshalBackupSchedule(data.backup_schedule) : void 0,
|
|
204
214
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
215
|
+
encryption: data.encryption ? unmarshalEncryptionAtRest(data.encryption) : void 0,
|
|
205
216
|
endpoint: data.endpoint ? unmarshalEndpoint(data.endpoint) : void 0,
|
|
206
217
|
endpoints: marshalling.unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
207
218
|
engine: data.engine,
|
|
@@ -695,9 +706,13 @@ const marshalCreateInstanceFromSnapshotRequest = (request, defaults) => ({
|
|
|
695
706
|
is_ha_cluster: request.isHaCluster,
|
|
696
707
|
node_type: request.nodeType
|
|
697
708
|
});
|
|
709
|
+
const marshalEncryptionAtRest = (request, defaults) => ({
|
|
710
|
+
enabled: request.enabled
|
|
711
|
+
});
|
|
698
712
|
const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
699
713
|
backup_same_region: request.backupSameRegion,
|
|
700
714
|
disable_backup: request.disableBackup,
|
|
715
|
+
encryption: request.encryption !== void 0 ? marshalEncryptionAtRest(request.encryption) : void 0,
|
|
701
716
|
engine: request.engine,
|
|
702
717
|
init_endpoints: request.initEndpoints !== void 0 ? request.initEndpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
|
|
703
718
|
init_settings: request.initSettings !== void 0 ? request.initSettings.map((elt) => marshalInstanceSetting(elt)) : void 0,
|
|
@@ -143,6 +143,16 @@ const unmarshalBackupSchedule = (data) => {
|
|
|
143
143
|
retention: data.retention
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
+
const unmarshalEncryptionAtRest = (data) => {
|
|
147
|
+
if (!isJSONObject(data)) {
|
|
148
|
+
throw new TypeError(
|
|
149
|
+
`Unmarshalling the type 'EncryptionAtRest' failed as data isn't a dictionary.`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
enabled: data.enabled
|
|
154
|
+
};
|
|
155
|
+
};
|
|
146
156
|
const unmarshalInstanceSetting = (data) => {
|
|
147
157
|
if (!isJSONObject(data)) {
|
|
148
158
|
throw new TypeError(
|
|
@@ -200,6 +210,7 @@ const unmarshalInstance = (data) => {
|
|
|
200
210
|
backupSameRegion: data.backup_same_region,
|
|
201
211
|
backupSchedule: data.backup_schedule ? unmarshalBackupSchedule(data.backup_schedule) : void 0,
|
|
202
212
|
createdAt: unmarshalDate(data.created_at),
|
|
213
|
+
encryption: data.encryption ? unmarshalEncryptionAtRest(data.encryption) : void 0,
|
|
203
214
|
endpoint: data.endpoint ? unmarshalEndpoint(data.endpoint) : void 0,
|
|
204
215
|
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
205
216
|
engine: data.engine,
|
|
@@ -693,9 +704,13 @@ const marshalCreateInstanceFromSnapshotRequest = (request, defaults) => ({
|
|
|
693
704
|
is_ha_cluster: request.isHaCluster,
|
|
694
705
|
node_type: request.nodeType
|
|
695
706
|
});
|
|
707
|
+
const marshalEncryptionAtRest = (request, defaults) => ({
|
|
708
|
+
enabled: request.enabled
|
|
709
|
+
});
|
|
696
710
|
const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
697
711
|
backup_same_region: request.backupSameRegion,
|
|
698
712
|
disable_backup: request.disableBackup,
|
|
713
|
+
encryption: request.encryption !== void 0 ? marshalEncryptionAtRest(request.encryption) : void 0,
|
|
699
714
|
engine: request.engine,
|
|
700
715
|
init_endpoints: request.initEndpoints !== void 0 ? request.initEndpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
|
|
701
716
|
init_settings: request.initSettings !== void 0 ? request.initSettings.map((elt) => marshalInstanceSetting(elt)) : void 0,
|
|
@@ -179,6 +179,9 @@ export interface BackupSchedule {
|
|
|
179
179
|
/** Next run of the backup schedule (accurate to 10 minutes). */
|
|
180
180
|
nextRunAt?: Date;
|
|
181
181
|
}
|
|
182
|
+
export interface EncryptionAtRest {
|
|
183
|
+
enabled: boolean;
|
|
184
|
+
}
|
|
182
185
|
export interface InstanceSetting {
|
|
183
186
|
name: string;
|
|
184
187
|
value: string;
|
|
@@ -421,6 +424,8 @@ export interface Instance {
|
|
|
421
424
|
backupSameRegion: boolean;
|
|
422
425
|
/** List of Database Instance maintenance events. */
|
|
423
426
|
maintenances: Maintenance[];
|
|
427
|
+
/** Encryption at rest settings for your Database Instance. */
|
|
428
|
+
encryption?: EncryptionAtRest;
|
|
424
429
|
}
|
|
425
430
|
export interface NodeType {
|
|
426
431
|
/** Node Type name identifier. */
|
|
@@ -671,6 +676,8 @@ export type CreateInstanceRequest = {
|
|
|
671
676
|
* the Database Instance.
|
|
672
677
|
*/
|
|
673
678
|
backupSameRegion: boolean;
|
|
679
|
+
/** Encryption at rest settings for your Database Instance. */
|
|
680
|
+
encryption?: EncryptionAtRest;
|
|
674
681
|
};
|
|
675
682
|
export type CreateReadReplicaEndpointRequest = {
|
|
676
683
|
/**
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { WaitForOptions, Zone } from '../../../bridge';
|
|
3
3
|
import type { ACLRule, AddAclRulesRequest, AddAclRulesResponse, AddClusterSettingsRequest, AddEndpointsRequest, AddEndpointsResponse, Cluster, ClusterMetricsResponse, ClusterSettingsResponse, CreateClusterRequest, DeleteAclRuleRequest, DeleteClusterRequest, DeleteClusterSettingRequest, DeleteEndpointRequest, Endpoint, GetAclRuleRequest, GetClusterCertificateRequest, GetClusterMetricsRequest, GetClusterRequest, GetEndpointRequest, ListClusterVersionsRequest, ListClusterVersionsResponse, ListClustersRequest, ListClustersResponse, ListNodeTypesRequest, ListNodeTypesResponse, MigrateClusterRequest, RenewClusterCertificateRequest, SetAclRulesRequest, SetAclRulesResponse, SetClusterSettingsRequest, SetEndpointsRequest, SetEndpointsResponse, UpdateClusterRequest, UpdateEndpointRequest } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Managed Database for Redis™ API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Managed Databases for Redis™.
|
|
8
|
+
*/
|
|
5
9
|
export declare class API extends ParentAPI {
|
|
6
10
|
/** Lists the available zones of the API. */
|
|
7
11
|
static readonly LOCALITIES: Zone[];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
3
|
import type { CreateNamespaceRequest, DeleteImageRequest, DeleteNamespaceRequest, DeleteTagRequest, GetImageRequest, GetNamespaceRequest, GetTagRequest, Image, ListImagesRequest, ListImagesResponse, ListNamespacesRequest, ListNamespacesResponse, ListTagsRequest, ListTagsResponse, Namespace, Tag, UpdateImageRequest, UpdateNamespaceRequest } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Container Registry API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Container Registry resources.
|
|
8
|
+
*/
|
|
5
9
|
export declare class API extends ParentAPI {
|
|
6
10
|
/** Lists the available regions of the API. */
|
|
7
11
|
static readonly LOCALITIES: Region[];
|
|
@@ -4,8 +4,9 @@ import type { AccessSecretVersionByNameRequest, AccessSecretVersionRequest, Acce
|
|
|
4
4
|
/**
|
|
5
5
|
* Secret Manager API.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* This API allows you to manage your Secret Manager services, for storing,
|
|
8
|
+
* accessing and sharing sensitive data such as passwords, API keys and
|
|
9
|
+
* certificates.
|
|
9
10
|
*/
|
|
10
11
|
export declare class API extends ParentAPI {
|
|
11
12
|
/** Lists the available regions of the API. */
|
|
@@ -4,8 +4,9 @@ import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, Acce
|
|
|
4
4
|
/**
|
|
5
5
|
* Secret Manager API.
|
|
6
6
|
*
|
|
7
|
-
* This API allows you to
|
|
8
|
-
* such as passwords, API keys and
|
|
7
|
+
* This API allows you to manage your Secret Manager services, for storing,
|
|
8
|
+
* accessing and sharing sensitive data such as passwords, API keys and
|
|
9
|
+
* certificates.
|
|
9
10
|
*/
|
|
10
11
|
export declare class API extends ParentAPI {
|
|
11
12
|
/** Lists the available regions of the API. */
|
|
@@ -4,7 +4,7 @@ import type { CreateDatabaseRequest, Database, DatabaseBackup, DeleteDatabaseReq
|
|
|
4
4
|
/**
|
|
5
5
|
* Serverless SQL Databases API.
|
|
6
6
|
*
|
|
7
|
-
* This API allows you to manage your Serverless SQL
|
|
7
|
+
* This API allows you to manage your Serverless SQL Databases.
|
|
8
8
|
*/
|
|
9
9
|
export declare class API extends ParentAPI {
|
|
10
10
|
/** Lists the available regions of the API. */
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
3
|
import type { CancelEmailRequest, CheckDomainRequest, CreateDomainRequest, CreateEmailRequest, CreateEmailResponse, Domain, DomainLastStatus, Email, GetDomainLastStatusRequest, GetDomainRequest, GetEmailRequest, GetStatisticsRequest, ListDomainsRequest, ListDomainsResponse, ListEmailsRequest, ListEmailsResponse, RevokeDomainRequest, Statistics } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Transactional Email API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Transactional Email services.
|
|
8
|
+
*/
|
|
5
9
|
export declare class API extends ParentAPI {
|
|
6
10
|
/** Lists the available regions of the API. */
|
|
7
11
|
static readonly LOCALITIES: Region[];
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Zone } from '../../../bridge';
|
|
3
3
|
import type { CreatePrivateNetworkRequest, DeletePrivateNetworkRequest, GetPrivateNetworkRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, PrivateNetwork, UpdatePrivateNetworkRequest } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* VPC API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Virtual Private Clouds (VPCs) and Private
|
|
8
|
+
* Networks.
|
|
9
|
+
*/
|
|
5
10
|
export declare class API extends ParentAPI {
|
|
6
11
|
/** Lists the available zones of the API. */
|
|
7
12
|
static readonly LOCALITIES: Zone[];
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region } from '../../../bridge';
|
|
3
3
|
import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListVPCsRequest, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateVPCRequest, VPC } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* VPC API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Virtual Private Clouds (VPCs) and Private
|
|
8
|
+
* Networks.
|
|
9
|
+
*/
|
|
5
10
|
export declare class API extends ParentAPI {
|
|
6
11
|
/** Lists the available regions of the API. */
|
|
7
12
|
static readonly LOCALITIES: Region[];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { WaitForOptions, Zone } from '../../../bridge';
|
|
3
3
|
import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, EnableIPMobilityRequest, Gateway, GatewayNetwork, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, ListDHCPEntriesRequest, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPATRulesRequest, ListPATRulesResponse, PATRule, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Public Gateways API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Public Gateways.
|
|
8
|
+
*/
|
|
5
9
|
export declare class API extends ParentAPI {
|
|
6
10
|
/** Lists the available zones of the API. */
|
|
7
11
|
static readonly LOCALITIES: Zone[];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
3
|
import type { CreateHostingRequest, CreateSessionRequest, DeleteHostingRequest, DnsRecords, GetDomainDnsRecordsRequest, GetHostingRequest, Hosting, ListControlPanelsRequest, ListControlPanelsResponse, ListHostingsRequest, ListHostingsResponse, ListOffersRequest, ListOffersResponse, ResetHostingPasswordRequest, ResetHostingPasswordResponse, RestoreHostingRequest, Session, UpdateHostingRequest } from './types.gen';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Web Hosting API.
|
|
6
|
+
*
|
|
7
|
+
* This API allows you to manage your Web Hosting services.
|
|
8
|
+
*/
|
|
5
9
|
export declare class API extends ParentAPI {
|
|
6
10
|
/** Lists the available regions of the API. */
|
|
7
11
|
static readonly LOCALITIES: Region[];
|
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.28.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.28.0";
|
package/dist/scw/constants.js
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents API metadata.
|
|
3
|
+
*
|
|
4
|
+
* @remarks These metadata are only here for debugging. Do not rely on these values.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface ServiceInfo {
|
|
9
|
+
/** Name of the API */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Human readable description for the API. */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Version of the API. */
|
|
14
|
+
version: string;
|
|
15
|
+
/** Web url where the documentation of the API can be found. */
|
|
16
|
+
documentationUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Represents an amount of money with its currency type.
|
|
20
|
+
*/
|
|
21
|
+
export interface Money {
|
|
22
|
+
/** 3-letter currency code defined in ISO 4217. */
|
|
23
|
+
currencyCode: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whole units of the amount.
|
|
26
|
+
*
|
|
27
|
+
* For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
|
|
28
|
+
*/
|
|
29
|
+
units: number;
|
|
30
|
+
/**
|
|
31
|
+
* Number of nano (10^-9) units of the amount.
|
|
32
|
+
*
|
|
33
|
+
* The value must be between -999,999,999 and +999,999,999 inclusive.
|
|
34
|
+
* If `units` is positive, `nanos` must be positive or zero.
|
|
35
|
+
* If `units` is zero, `nanos` can be positive, zero, or negative.
|
|
36
|
+
* If `units` is negative, `nanos` must be negative or zero.
|
|
37
|
+
* For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
|
|
38
|
+
*/
|
|
39
|
+
nanos: number;
|
|
40
|
+
}
|
|
41
|
+
/** Represents a point in a TimeSeries. */
|
|
42
|
+
export interface TimeSeriesPoint {
|
|
43
|
+
/** Date of the point. */
|
|
44
|
+
timestamp?: Date;
|
|
45
|
+
/** Value of the point. */
|
|
46
|
+
value: number;
|
|
47
|
+
}
|
|
48
|
+
/** Represents a time series that could be used for graph purposes. */
|
|
49
|
+
export interface TimeSeries {
|
|
50
|
+
/** Name of the metric. */
|
|
51
|
+
name: string;
|
|
52
|
+
/** Points contains all the points that composed the series. */
|
|
53
|
+
points: TimeSeriesPoint[];
|
|
54
|
+
/** Metadata contains some string metadata related to a metric. */
|
|
55
|
+
metadata: Record<string, string>;
|
|
56
|
+
}
|
|
57
|
+
/** Represents a Scaleway file. */
|
|
58
|
+
export interface ScwFile {
|
|
59
|
+
/** Name of the file. */
|
|
60
|
+
name: string;
|
|
61
|
+
/** Content-type of the file. */
|
|
62
|
+
contentType: string;
|
|
63
|
+
/** Content of the file in base64. */
|
|
64
|
+
content: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JSONObject } from '../../helpers/json';
|
|
2
|
+
import type { ScalewayError } from './scw-error';
|
|
3
|
+
/**
|
|
4
|
+
* Interface with static method that initialize {@link ScalewayError} from JSON.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface ScalewayErrorFromJSONInitializer {
|
|
9
|
+
fromJSON(status: number, obj: Readonly<JSONObject>): ScalewayError | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Scaleway Request. */
|
|
2
|
+
export type ScwRequest = {
|
|
3
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
4
|
+
path: string;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
body?: string;
|
|
7
|
+
urlParams?: URLSearchParams;
|
|
8
|
+
responseType?: 'json' | 'text' | 'blob';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A factory to unmarshal a response.
|
|
12
|
+
*
|
|
13
|
+
* @param obj - The input object.
|
|
14
|
+
* @returns The output object
|
|
15
|
+
*/
|
|
16
|
+
export type ResponseUnmarshaller<T> = (obj: unknown) => T;
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1960](https://github.com/scaleway/scaleway-lib/pull/1960) [`d034b3c`](https://github.com/scaleway/scaleway-lib/commit/d034b3cda1cac30ce2ed4e95be5a2c79642f8ca4) Thanks [@Slashgear](https://github.com/Slashgear)! - add legacy main attribut for CommonJS export usage
|
|
8
|
+
|
|
9
|
+
## 5.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#1953](https://github.com/scaleway/scaleway-lib/pull/1953) [`1fddf05`](https://github.com/scaleway/scaleway-lib/commit/1fddf0515851908b094f983b05b3d87af8eef433) Thanks [@philibea](https://github.com/philibea)! - add cjs build
|
|
14
|
+
|
|
15
|
+
## 5.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#1943](https://github.com/scaleway/scaleway-lib/pull/1943) [`e726def`](https://github.com/scaleway/scaleway-lib/commit/e726def8e0cb4593f800f9acecca51b173ae907a) Thanks [@philibea](https://github.com/philibea)! - Migration from rollup to vite
|
|
20
|
+
|
|
21
|
+
## 5.0.0
|
|
22
|
+
|
|
23
|
+
### Major Changes
|
|
24
|
+
|
|
25
|
+
- [#1837](https://github.com/scaleway/scaleway-lib/pull/1837) [`5404963`](https://github.com/scaleway/scaleway-lib/commit/5404963ddd01fafe6ed9753d8324fb19849065ca) Thanks [@philibea](https://github.com/philibea)! - upgrade node version from 14 to 20
|
|
26
|
+
|
|
3
27
|
## 4.0.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|