@scaleway/sdk 2.4.0 → 2.4.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/dist/index.cjs +3 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +1 -1
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
const version = 'v2.
|
|
500
|
+
const version = 'v2.4.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () =>
|
|
@@ -26704,6 +26704,7 @@ exports.addAsyncHeaderInterceptor = addAsyncHeaderInterceptor;
|
|
|
26704
26704
|
exports.authenticateWithSessionToken = authenticateWithSessionToken;
|
|
26705
26705
|
exports.createAdvancedClient = createAdvancedClient;
|
|
26706
26706
|
exports.createClient = createClient;
|
|
26707
|
+
exports.createExponentialBackoffStrategy = createExponentialBackoffStrategy;
|
|
26707
26708
|
exports.enableConsoleLogger = enableConsoleLogger;
|
|
26708
26709
|
exports.enrichForPagination = enrichForPagination;
|
|
26709
26710
|
exports.isJSONObject = isJSONObject;
|
|
@@ -26712,6 +26713,7 @@ exports.marshalScwFile = marshalScwFile;
|
|
|
26712
26713
|
exports.marshalTimeSeries = marshalTimeSeries;
|
|
26713
26714
|
exports.resolveOneOf = resolveOneOf;
|
|
26714
26715
|
exports.setLogger = setLogger;
|
|
26716
|
+
exports.tryAtIntervals = tryAtIntervals;
|
|
26715
26717
|
exports.unmarshalArrayOfObject = unmarshalArrayOfObject;
|
|
26716
26718
|
exports.unmarshalDate = unmarshalDate;
|
|
26717
26719
|
exports.unmarshalMapOfObject = unmarshalMapOfObject;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function to retry logic between each interval.
|
|
3
|
+
*
|
|
4
|
+
* @returns The result and if it's done
|
|
5
|
+
*
|
|
6
|
+
* @throws An exception might be thrown by the logic being run
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
type Retry<T> = () => Promise<IteratorResult<T, T>>;
|
|
1
11
|
/**
|
|
2
12
|
* Generated interval strategy iterator.
|
|
3
13
|
*
|
|
4
14
|
* @internal
|
|
5
15
|
*/
|
|
6
16
|
type IntervalStrategy = Generator<number, never | number, number>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an exponential backoff interval strategy.
|
|
19
|
+
*
|
|
20
|
+
* @param minDelay - The minimum delay before the next try in seconds
|
|
21
|
+
* @param maxDelay - The maximum delay before the next try in seconds
|
|
22
|
+
* @returns An exponential backoff generator
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
declare function createExponentialBackoffStrategy(minDelay: number, maxDelay: number): IntervalStrategy;
|
|
27
|
+
/**
|
|
28
|
+
* Tries a specific logic several times until it succeeds, timeouts, or throws an exception.
|
|
29
|
+
*
|
|
30
|
+
* @param retry - The function to retry logic between each interval
|
|
31
|
+
* @param strategy - A generated interval strategy iterator
|
|
32
|
+
* @param timeout - The maximum time elapsed before timeout error
|
|
33
|
+
*
|
|
34
|
+
* @throws An timeout exception or error thrown by the logic being run
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
declare const tryAtIntervals: <T>(retry: Retry<T>, strategy: IntervalStrategy, timeout?: number) => Promise<T>;
|
|
7
39
|
/**
|
|
8
40
|
* Represents the condition to stop waiting for a resource.
|
|
9
41
|
*
|
|
@@ -31661,4 +31693,4 @@ declare namespace index {
|
|
|
31661
31693
|
export { index_gen as v1alpha1 };
|
|
31662
31694
|
}
|
|
31663
31695
|
|
|
31664
|
-
export { API$v as API, index$x as Account, index$w as AppleSilicon, index$u as BareMetal, index$t as Billing, index$s as Block, type Client, type ClientConfig, index$r as Cockpit, index$q as Container, type DefaultValues, index$p as DocumentDB, index$o as Domain, index$y as Errors, index$n as FlexibleIP, index$m as Function, index$l as IAM, index$i as IOT, index$h as IPAM, index$g as IPFS, index$j as Instance, index$f as Jobs, index$d as K8S, index$b as LB, type Logger, index$9 as MNQ, index$a as Marketplace, type Money, type NetworkInterceptors, type Profile, index$8 as RDB, index$7 as Redis, type Region, index$6 as Registry, type RequestInterceptor, type ResponseErrorInterceptor, type ResponseInterceptor, type ScwFile, index$5 as Secret, type ServiceInfo, type Settings, index_gen$6 as Std, index$4 as Test, type TimeSeries, index$3 as TransactionalEmail, index$2 as VPC, index$1 as VPCGW, type WaitForOptions, type WaitForStopCondition, index as Webhosting, type Zone, addAsyncHeaderInterceptor, authenticateWithSessionToken, createAdvancedClient, createClient, enableConsoleLogger, enrichForPagination, isJSONObject, marshalMoney, marshalScwFile, marshalTimeSeries, resolveOneOf, setLogger, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, urlParams, validatePathParam, waitForResource, withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix };
|
|
31696
|
+
export { API$v as API, index$x as Account, index$w as AppleSilicon, index$u as BareMetal, index$t as Billing, index$s as Block, type Client, type ClientConfig, index$r as Cockpit, index$q as Container, type DefaultValues, index$p as DocumentDB, index$o as Domain, index$y as Errors, index$n as FlexibleIP, index$m as Function, index$l as IAM, index$i as IOT, index$h as IPAM, index$g as IPFS, index$j as Instance, index$f as Jobs, index$d as K8S, index$b as LB, type Logger, index$9 as MNQ, index$a as Marketplace, type Money, type NetworkInterceptors, type Profile, index$8 as RDB, index$7 as Redis, type Region, index$6 as Registry, type RequestInterceptor, type ResponseErrorInterceptor, type ResponseInterceptor, type ScwFile, index$5 as Secret, type ServiceInfo, type Settings, index_gen$6 as Std, index$4 as Test, type TimeSeries, index$3 as TransactionalEmail, index$2 as VPC, index$1 as VPCGW, type WaitForOptions, type WaitForStopCondition, index as Webhosting, type Zone, addAsyncHeaderInterceptor, authenticateWithSessionToken, createAdvancedClient, createClient, createExponentialBackoffStrategy, enableConsoleLogger, enrichForPagination, isJSONObject, marshalMoney, marshalScwFile, marshalTimeSeries, resolveOneOf, setLogger, tryAtIntervals, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, urlParams, validatePathParam, waitForResource, withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withPr
|
|
|
4
4
|
import * as index from './scw/errors/standard/index.js';
|
|
5
5
|
export { index as Errors };
|
|
6
6
|
export { isJSONObject } from './helpers/json.js';
|
|
7
|
-
export { waitForResource } from './internal/async/interval-retrier.js';
|
|
7
|
+
export { createExponentialBackoffStrategy, tryAtIntervals, waitForResource } from './internal/async/interval-retrier.js';
|
|
8
8
|
export { addAsyncHeaderInterceptor } from './internal/interceptors/helpers.js';
|
|
9
9
|
export { API } from './scw/api.js';
|
|
10
10
|
export { authenticateWithSessionToken } from './scw/auth.js';
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"bundledDependencies": [
|
|
36
36
|
"@scaleway/random-name"
|
|
37
37
|
],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "fc423c5b5257068a58ccbaa28f241473f625b0f6"
|
|
39
39
|
}
|