@databricks/sdk-options 0.1.0-dev.4 → 0.1.0-dev.6
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/client/index.d.ts +14 -3
- package/dist/client/index.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/call/index.ts +0 -40
- package/src/client/index.ts +0 -50
- package/src/lro/index.ts +0 -29
package/dist/client/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { Credentials } from '@databricks/sdk-auth';
|
|
7
7
|
import type { HttpClient } from '@databricks/sdk-core/http';
|
|
8
8
|
import type { Logger } from '@databricks/sdk-core/logger';
|
|
9
|
+
import type { ProfileOptions } from '@databricks/sdk-core/profiles';
|
|
9
10
|
/** Options that configure a Databricks API client. */
|
|
10
11
|
export interface ClientOptions {
|
|
11
12
|
/** Host for the client. */
|
|
@@ -25,9 +26,8 @@ export interface ClientOptions {
|
|
|
25
26
|
*/
|
|
26
27
|
workspaceId?: string;
|
|
27
28
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Important: When set, this option ignores all other options.
|
|
29
|
+
* Base HTTP client used as the transport. Replaces the default fetch-based
|
|
30
|
+
* client (e.g. for a proxy, custom TLS, or instrumentation).
|
|
31
31
|
*/
|
|
32
32
|
httpClient?: HttpClient;
|
|
33
33
|
/** Credentials used to authenticate requests. */
|
|
@@ -39,5 +39,16 @@ export interface ClientOptions {
|
|
|
39
39
|
timeout?: number;
|
|
40
40
|
/** Logger used to record diagnostic messages. */
|
|
41
41
|
logger?: Logger;
|
|
42
|
+
/**
|
|
43
|
+
* Controls how a configuration profile fills the options left unset above.
|
|
44
|
+
*
|
|
45
|
+
* Profile resolution is enabled by default: the config file
|
|
46
|
+
* (~/.databrickscfg or `$DATABRICKS_CONFIG_FILE`) and DATABRICKS_*
|
|
47
|
+
* environment variables supply `host`, `accountId`, `workspaceId`, and
|
|
48
|
+
* credentials whenever the caller does not set them explicitly. Explicit
|
|
49
|
+
* values always win. Disable the file with `noProfile`, the environment
|
|
50
|
+
* with `disableEnv`, or select a specific `profile`/`configFile`.
|
|
51
|
+
*/
|
|
52
|
+
profileOptions?: ProfileOptions;
|
|
42
53
|
}
|
|
43
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAElE,sDAAsD;AACtD,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,iDAAiD;IACjD,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/sdk-options",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.6",
|
|
4
4
|
"description": "Options for configuring Databricks API clients and individual calls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
|
-
"src",
|
|
26
25
|
"LICENSE"
|
|
27
26
|
],
|
|
28
27
|
"scripts": {
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
"node": ">=22.0.0"
|
|
43
42
|
},
|
|
44
43
|
"dependencies": {
|
|
45
|
-
"@databricks/sdk-auth": ">=0.1.0-dev.
|
|
46
|
-
"@databricks/sdk-core": ">=0.1.0-dev.
|
|
44
|
+
"@databricks/sdk-auth": ">=0.1.0-dev.6 <1.0.0",
|
|
45
|
+
"@databricks/sdk-core": ">=0.1.0-dev.7 <1.0.0"
|
|
47
46
|
}
|
|
48
47
|
}
|
package/src/call/index.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options used to configure individual calls against the Databricks API.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type {Limiter, Retrier} from '@databricks/sdk-core/ops';
|
|
8
|
-
|
|
9
|
-
/** Options that configure a single call against the Databricks API. */
|
|
10
|
-
export interface CallOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Cancels the call when aborted. If {@link CallOptions.timeout} is also
|
|
13
|
-
* set, the call is cancelled when either the signal aborts or the timeout
|
|
14
|
-
* elapses, whichever happens first.
|
|
15
|
-
*/
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Provides a fresh {@link Retrier} for each call. The function is invoked
|
|
20
|
-
* once per call and must be safe to invoke concurrently. The returned
|
|
21
|
-
* retrier must be fresh within the context of a single call (e.g. no need
|
|
22
|
-
* to reset a backoff policy).
|
|
23
|
-
*
|
|
24
|
-
* If omitted, the call is not retried.
|
|
25
|
-
*/
|
|
26
|
-
retrier?: () => Retrier;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Rate limiter applied before each call attempt. If omitted, the call is
|
|
30
|
-
* not rate limited.
|
|
31
|
-
*/
|
|
32
|
-
rateLimiter?: Limiter;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Timeout, in milliseconds, that covers the entire execution including
|
|
36
|
-
* retries. If the signal already has a deadline, it is updated to the
|
|
37
|
-
* minimum of the signal's deadline and this timeout.
|
|
38
|
-
*/
|
|
39
|
-
timeout?: number;
|
|
40
|
-
}
|
package/src/client/index.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options used to configure Databricks API clients.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type {Credentials} from '@databricks/sdk-auth';
|
|
8
|
-
import type {HttpClient} from '@databricks/sdk-core/http';
|
|
9
|
-
import type {Logger} from '@databricks/sdk-core/logger';
|
|
10
|
-
|
|
11
|
-
/** Options that configure a Databricks API client. */
|
|
12
|
-
export interface ClientOptions {
|
|
13
|
-
/** Host for the client. */
|
|
14
|
-
host?: string;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Default Databricks account ID for account-level API paths that contain
|
|
18
|
-
* an `{account_id}` segment. The request's own `accountId` field takes
|
|
19
|
-
* precedence; this option is only consulted when the request leaves it
|
|
20
|
-
* unset.
|
|
21
|
-
*/
|
|
22
|
-
accountId?: string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Databricks workspace ID used to route workspace-level API calls on
|
|
26
|
-
* unified hosts (SPOG). When set, workspace-level methods send the
|
|
27
|
-
* `X-Databricks-Org-Id` header on every request. Ignored by clients that
|
|
28
|
-
* only expose account-level methods.
|
|
29
|
-
*/
|
|
30
|
-
workspaceId?: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* A pre-configured HTTP client to use when making HTTP requests.
|
|
34
|
-
*
|
|
35
|
-
* Important: When set, this option ignores all other options.
|
|
36
|
-
*/
|
|
37
|
-
httpClient?: HttpClient;
|
|
38
|
-
|
|
39
|
-
/** Credentials used to authenticate requests. */
|
|
40
|
-
credentials?: Credentials;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Overall API call timeout, in milliseconds, applied by default to every
|
|
44
|
-
* request issued through the client.
|
|
45
|
-
*/
|
|
46
|
-
timeout?: number;
|
|
47
|
-
|
|
48
|
-
/** Logger used to record diagnostic messages. */
|
|
49
|
-
logger?: Logger;
|
|
50
|
-
}
|
package/src/lro/index.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options used to configure waiting on a long-running operation.
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Options that configure waiting on a long-running operation.
|
|
9
|
-
*
|
|
10
|
-
* A wait may issue many polling calls under the hood; these options apply to
|
|
11
|
-
* the entire wait, not to any single poll. Per-poll knobs (rate limiting,
|
|
12
|
-
* retry strategy) are intentionally omitted to keep the surface focused on
|
|
13
|
-
* the only thing callers reliably need: bounding how long to wait.
|
|
14
|
-
*/
|
|
15
|
-
export interface LroOptions {
|
|
16
|
-
/**
|
|
17
|
-
* Cancels the wait when aborted. If {@link LroOptions.timeout} is also
|
|
18
|
-
* set, the wait is cancelled when either the signal aborts or the timeout
|
|
19
|
-
* elapses, whichever happens first.
|
|
20
|
-
*/
|
|
21
|
-
signal?: AbortSignal;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Total timeout, in milliseconds, that bounds the entire wait, including
|
|
25
|
-
* all polling attempts. If the signal already has a deadline, it is
|
|
26
|
-
* updated to the minimum of the signal's deadline and this timeout.
|
|
27
|
-
*/
|
|
28
|
-
timeout?: number;
|
|
29
|
-
}
|