@databricks/sdk-forecasting 0.34.0 → 0.35.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.
@@ -0,0 +1,7 @@
1
+ //#region package.json
2
+ var name = "@databricks/sdk-forecasting";
3
+ var version = "0.35.0";
4
+
5
+ //#endregion
6
+ export { name, version };
7
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -1,32 +1,36 @@
1
- import type { CallOptions } from '@databricks/sdk-options/call';
2
- import type { ClientOptions } from '@databricks/sdk-options/client';
3
- import type { LroOptions } from '@databricks/sdk-options/lro';
4
- import type { CreateForecastingExperimentRequest, ForecastingExperiment, GetForecastingExperimentRequest } from './model';
5
- export declare class ForecastingClient {
6
- private readonly options;
7
- private readonly logger;
8
- private readonly userAgent;
9
- private config;
10
- constructor(options: ClientOptions);
11
- private resolveConfig;
12
- /** Creates a serverless forecasting experiment. Returns the experiment ID. */
13
- private createForecastingExperimentBase;
14
- /** Creates a serverless forecasting experiment. Returns the experiment ID. */
15
- createForecastingExperiment(req: CreateForecastingExperimentRequest, options?: CallOptions): Promise<CreateForecastingExperimentWaiter>;
16
- /** Public RPC to get forecasting experiment */
17
- getForecastingExperiment(req: GetForecastingExperimentRequest, options?: CallOptions): Promise<ForecastingExperiment>;
1
+ import { CreateForecastingExperimentRequest, ForecastingExperiment, GetForecastingExperimentRequest } from "./model.js";
2
+ import { CallOptions } from "@databricks/sdk-options/call";
3
+ import { ClientOptions } from "@databricks/sdk-options/client";
4
+ import { LroOptions } from "@databricks/sdk-options/lro";
5
+
6
+ //#region src/v1/client.d.ts
7
+ declare class ForecastingClient {
8
+ private readonly options;
9
+ private readonly logger;
10
+ private readonly userAgent;
11
+ private config;
12
+ constructor(options: ClientOptions);
13
+ private resolveConfig;
14
+ /** Creates a serverless forecasting experiment. Returns the experiment ID. */
15
+ private createForecastingExperimentBase;
16
+ /** Creates a serverless forecasting experiment. Returns the experiment ID. */
17
+ createForecastingExperiment(req: CreateForecastingExperimentRequest, options?: CallOptions): Promise<CreateForecastingExperimentWaiter>;
18
+ /** Public RPC to get forecasting experiment */
19
+ getForecastingExperiment(req: GetForecastingExperimentRequest, options?: CallOptions): Promise<ForecastingExperiment>;
18
20
  }
19
- export declare class CreateForecastingExperimentWaiter {
20
- private readonly client;
21
- readonly experimentId: string;
22
- constructor(client: ForecastingClient, experimentId: string);
23
- /**
24
- * Polls until the operation reaches a terminal state.
25
- *
26
- * Throws if a failure state is reached.
27
- */
28
- wait(options?: LroOptions): Promise<ForecastingExperiment>;
29
- /** Checks whether the operation has reached a terminal state. */
30
- done(options?: CallOptions): Promise<boolean>;
21
+ declare class CreateForecastingExperimentWaiter {
22
+ private readonly client;
23
+ readonly experimentId: string;
24
+ constructor(client: ForecastingClient, experimentId: string);
25
+ /**
26
+ * Polls until the operation reaches a terminal state.
27
+ *
28
+ * Throws if a failure state is reached.
29
+ */
30
+ wait(options?: LroOptions): Promise<ForecastingExperiment>;
31
+ /** Checks whether the operation has reached a terminal state. */
32
+ done(options?: CallOptions): Promise<boolean>;
31
33
  }
34
+ //#endregion
35
+ export { CreateForecastingExperimentWaiter, ForecastingClient };
32
36
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAa5D,OAAO,KAAK,EACV,kCAAkC,EAElC,qBAAqB,EACrB,+BAA+B,EAChC,MAAM,SAAS,CAAC;AAcjB,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;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BAEQ,MAAA;EAAA,SACR,YAAA;cADQ,MAAA,EAAQ,iBAAA,EAChB,YAAA;EAxGM;;;;;EAgHX,IAAA,CAAK,OAAA,GAAU,UAAA,GAAa,OAAA,CAAQ,qBAAA;EA1F5B;EAgIR,IAAA,CAAK,OAAA,GAAU,WAAA,GAAc,OAAA;AAAA"}
package/dist/v1/client.js CHANGED
@@ -1,158 +1,124 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { VERSION as AUTH_VERSION } from '@databricks/sdk-auth';
3
- import { createDefault } from '@databricks/sdk-core/clientinfo';
4
- import { NoOpLogger } from '@databricks/sdk-core/logger';
5
- import { resolveClientConfig } from './transport';
6
- import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse, executeWait, StillRunningError, } from './utils';
7
- import pkgJson from '../../package.json' with { type: 'json' };
8
- import { ForecastingExperiment_State, marshalCreateForecastingExperimentRequestSchema, unmarshalCreateForecastingExperimentResponseSchema, unmarshalForecastingExperimentSchema, } from './model';
9
- // Package identity segment for this client to be used in the User-Agent header.
1
+ import { resolveClientConfig } from "./transport.js";
2
+ import { StillRunningError, buildHttpRequest, executeCall, executeHttpCall, executeWait, marshalRequest, parseResponse } from "./utils.js";
3
+ import { name, version } from "../package.js";
4
+ import { ForecastingExperiment_State, marshalCreateForecastingExperimentRequestSchema, unmarshalCreateForecastingExperimentResponseSchema, unmarshalForecastingExperimentSchema } from "./model.js";
5
+ import { VERSION } from "@databricks/sdk-auth";
6
+ import { createDefault } from "@databricks/sdk-core/clientinfo";
7
+ import { NoOpLogger } from "@databricks/sdk-core/logger";
8
+
9
+ //#region src/v1/client.ts
10
10
  const PACKAGE_SEGMENT = {
11
- key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
12
- value: pkgJson.version,
11
+ key: "sdk-js-" + name.replace(/^@[^/]+\/sdk-/, ""),
12
+ value: version
13
13
  };
14
- export class ForecastingClient {
15
- options;
16
- logger;
17
- // User-Agent header value. Composed once at construction from
18
- // createDefault() merged with this package's identity and the active
19
- // credential's name.
20
- userAgent;
21
- // Memoized configuration. The profile is resolved once, lazily, on the first
22
- // request, then reused; host, workspaceId/accountId, and credentials are
23
- // filled from it when not set explicitly on the options.
24
- config;
25
- constructor(options) {
26
- this.options = options;
27
- this.logger = options.logger ?? new NoOpLogger();
28
- const info = createDefault()
29
- .with(PACKAGE_SEGMENT)
30
- .with({ key: 'sdk-js-auth', value: AUTH_VERSION })
31
- .with({ key: 'auth', value: options.credentials?.name() ?? 'default' });
32
- this.userAgent = info.toString();
33
- }
34
- resolveConfig() {
35
- this.config ??= resolveClientConfig(this.options);
36
- return this.config;
37
- }
38
- /** Creates a serverless forecasting experiment. Returns the experiment ID. */
39
- async createForecastingExperimentBase(req, options) {
40
- const { host, workspaceId, httpClient } = await this.resolveConfig();
41
- const url = `${host}/api/2.0/automl/create-forecasting-experiment`;
42
- const body = marshalRequest(req, marshalCreateForecastingExperimentRequestSchema);
43
- let resp;
44
- const call = async (callSignal) => {
45
- const headers = new Headers({ 'Content-Type': 'application/json' });
46
- if (workspaceId !== undefined) {
47
- headers.set('X-Databricks-Workspace-Id', workspaceId);
48
- }
49
- headers.set('User-Agent', this.userAgent);
50
- const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
51
- const respBody = await executeHttpCall({
52
- request: httpReq,
53
- httpClient,
54
- logger: this.logger,
55
- });
56
- resp = parseResponse(respBody, unmarshalCreateForecastingExperimentResponseSchema);
57
- };
58
- await executeCall(call, options);
59
- if (resp === undefined) {
60
- throw new Error('operation completed without a result.');
61
- }
62
- return resp;
63
- }
64
- /** Creates a serverless forecasting experiment. Returns the experiment ID. */
65
- async createForecastingExperiment(req, options) {
66
- const resp = await this.createForecastingExperimentBase(req, options);
67
- if (resp.experimentId === undefined) {
68
- throw new Error('response field experimentId required for polling is missing');
69
- }
70
- return new CreateForecastingExperimentWaiter(this, resp.experimentId);
71
- }
72
- /** Public RPC to get forecasting experiment */
73
- async getForecastingExperiment(req, options) {
74
- const { host, workspaceId, httpClient } = await this.resolveConfig();
75
- const url = `${host}/api/2.0/automl/get-forecasting-experiment/${req.experimentId ?? ''}`;
76
- let resp;
77
- const call = async (callSignal) => {
78
- const headers = new Headers();
79
- if (workspaceId !== undefined) {
80
- headers.set('X-Databricks-Workspace-Id', workspaceId);
81
- }
82
- headers.set('User-Agent', this.userAgent);
83
- const httpReq = buildHttpRequest('GET', url, headers, callSignal);
84
- const respBody = await executeHttpCall({
85
- request: httpReq,
86
- httpClient,
87
- logger: this.logger,
88
- });
89
- resp = parseResponse(respBody, unmarshalForecastingExperimentSchema);
90
- };
91
- await executeCall(call, options);
92
- if (resp === undefined) {
93
- throw new Error('operation completed without a result.');
94
- }
95
- return resp;
96
- }
97
- }
98
- export class CreateForecastingExperimentWaiter {
99
- client;
100
- experimentId;
101
- constructor(client, experimentId) {
102
- this.client = client;
103
- this.experimentId = experimentId;
104
- }
105
- /**
106
- * Polls until the operation reaches a terminal state.
107
- *
108
- * Throws if a failure state is reached.
109
- */
110
- async wait(options) {
111
- let result;
112
- const call = async (callSignal) => {
113
- const pollResp = await this.client.getForecastingExperiment({
114
- experimentId: this.experimentId,
115
- }, callSignal !== undefined ? { signal: callSignal } : undefined);
116
- const status = pollResp.state;
117
- if (status === undefined) {
118
- throw new Error('response missing required status field');
119
- }
120
- switch (status) {
121
- case ForecastingExperiment_State.SUCCEEDED:
122
- result = pollResp;
123
- return;
124
- case ForecastingExperiment_State.FAILED:
125
- case ForecastingExperiment_State.CANCELLED: {
126
- const msg = '(no message)';
127
- throw new Error(`terminal state ${status}: ${msg}`);
128
- }
129
- default:
130
- throw new StillRunningError();
131
- }
132
- };
133
- await executeWait(call, options);
134
- if (result === undefined) {
135
- throw new Error('operation completed without a result.');
136
- }
137
- return result;
138
- }
139
- /** Checks whether the operation has reached a terminal state. */
140
- async done(options) {
141
- const pollResp = await this.client.getForecastingExperiment({
142
- experimentId: this.experimentId,
143
- }, options);
144
- const status = pollResp.state;
145
- if (status === undefined) {
146
- throw new Error('response missing required status field');
147
- }
148
- switch (status) {
149
- case ForecastingExperiment_State.SUCCEEDED:
150
- case ForecastingExperiment_State.FAILED:
151
- case ForecastingExperiment_State.CANCELLED:
152
- return true;
153
- default:
154
- return false;
155
- }
156
- }
157
- }
14
+ var ForecastingClient = class {
15
+ options;
16
+ logger;
17
+ userAgent;
18
+ config;
19
+ constructor(options) {
20
+ this.options = options;
21
+ this.logger = options.logger ?? new NoOpLogger();
22
+ this.userAgent = createDefault().with(PACKAGE_SEGMENT).with({
23
+ key: "sdk-js-auth",
24
+ value: VERSION
25
+ }).with({
26
+ key: "auth",
27
+ value: options.credentials?.name() ?? "default"
28
+ }).toString();
29
+ }
30
+ resolveConfig() {
31
+ this.config ??= resolveClientConfig(this.options);
32
+ return this.config;
33
+ }
34
+ /** Creates a serverless forecasting experiment. Returns the experiment ID. */
35
+ async createForecastingExperimentBase(req, options) {
36
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
37
+ const url = `${host}/api/2.0/automl/create-forecasting-experiment`;
38
+ const body = marshalRequest(req, marshalCreateForecastingExperimentRequestSchema);
39
+ let resp;
40
+ const call = async (callSignal) => {
41
+ const headers = new Headers({ "Content-Type": "application/json" });
42
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
43
+ headers.set("User-Agent", this.userAgent);
44
+ resp = parseResponse(await executeHttpCall({
45
+ request: buildHttpRequest("POST", url, headers, callSignal, body),
46
+ httpClient,
47
+ logger: this.logger
48
+ }), unmarshalCreateForecastingExperimentResponseSchema);
49
+ };
50
+ await executeCall(call, options);
51
+ if (resp === void 0) throw new Error("operation completed without a result.");
52
+ return resp;
53
+ }
54
+ /** Creates a serverless forecasting experiment. Returns the experiment ID. */
55
+ async createForecastingExperiment(req, options) {
56
+ const resp = await this.createForecastingExperimentBase(req, options);
57
+ if (resp.experimentId === void 0) throw new Error("response field experimentId required for polling is missing");
58
+ return new CreateForecastingExperimentWaiter(this, resp.experimentId);
59
+ }
60
+ /** Public RPC to get forecasting experiment */
61
+ async getForecastingExperiment(req, options) {
62
+ const { host, workspaceId, httpClient } = await this.resolveConfig();
63
+ const url = `${host}/api/2.0/automl/get-forecasting-experiment/${req.experimentId ?? ""}`;
64
+ let resp;
65
+ const call = async (callSignal) => {
66
+ const headers = new Headers();
67
+ if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
68
+ headers.set("User-Agent", this.userAgent);
69
+ resp = parseResponse(await executeHttpCall({
70
+ request: buildHttpRequest("GET", url, headers, callSignal),
71
+ httpClient,
72
+ logger: this.logger
73
+ }), unmarshalForecastingExperimentSchema);
74
+ };
75
+ await executeCall(call, options);
76
+ if (resp === void 0) throw new Error("operation completed without a result.");
77
+ return resp;
78
+ }
79
+ };
80
+ var CreateForecastingExperimentWaiter = class {
81
+ constructor(client, experimentId) {
82
+ this.client = client;
83
+ this.experimentId = experimentId;
84
+ }
85
+ /**
86
+ * Polls until the operation reaches a terminal state.
87
+ *
88
+ * Throws if a failure state is reached.
89
+ */
90
+ async wait(options) {
91
+ let result;
92
+ const call = async (callSignal) => {
93
+ const pollResp = await this.client.getForecastingExperiment({ experimentId: this.experimentId }, callSignal !== void 0 ? { signal: callSignal } : void 0);
94
+ const status = pollResp.state;
95
+ if (status === void 0) throw new Error("response missing required status field");
96
+ switch (status) {
97
+ case ForecastingExperiment_State.SUCCEEDED:
98
+ result = pollResp;
99
+ return;
100
+ case ForecastingExperiment_State.FAILED:
101
+ case ForecastingExperiment_State.CANCELLED: throw new Error(`terminal state ${status}: (no message)`);
102
+ default: throw new StillRunningError();
103
+ }
104
+ };
105
+ await executeWait(call, options);
106
+ if (result === void 0) throw new Error("operation completed without a result.");
107
+ return result;
108
+ }
109
+ /** Checks whether the operation has reached a terminal state. */
110
+ async done(options) {
111
+ const status = (await this.client.getForecastingExperiment({ experimentId: this.experimentId }, options)).state;
112
+ if (status === void 0) throw new Error("response missing required status field");
113
+ switch (status) {
114
+ case ForecastingExperiment_State.SUCCEEDED:
115
+ case ForecastingExperiment_State.FAILED:
116
+ case ForecastingExperiment_State.CANCELLED: return true;
117
+ default: return false;
118
+ }
119
+ }
120
+ };
121
+
122
+ //#endregion
123
+ export { CreateForecastingExperimentWaiter, ForecastingClient };
158
124
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAKvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,OAAO,MAAM,oBAAoB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAO7D,OAAO,EACL,2BAA2B,EAC3B,+CAA+C,EAC/C,kDAAkD,EAClD,oCAAoC,GACrC,MAAM,SAAS,CAAC;AAEjB,gFAAgF;AAChF,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;IAC1D,KAAK,EAAE,OAAO,CAAC,OAAO;CACvB,CAAC;AAEF,MAAM,OAAO,iBAAiB;IACX,OAAO,CAAgB;IACvB,MAAM,CAAS;IAChC,8DAA8D;IAC9D,qEAAqE;IACrE,qBAAqB;IACJ,SAAS,CAAS;IACnC,6EAA6E;IAC7E,yEAAyE;IACzE,yDAAyD;IACjD,MAAM,CAA4C;IAE1D,YAAY,OAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,C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;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"client.js","names":["pkgJson.version","AUTH_VERSION"],"sources":["../../src/v1/client.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';\nimport {createDefault} from '@databricks/sdk-core/clientinfo';\nimport type {Logger} from '@databricks/sdk-core/logger';\nimport {NoOpLogger} from '@databricks/sdk-core/logger';\nimport type {CallOptions} from '@databricks/sdk-options/call';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\nimport type {LroOptions} from '@databricks/sdk-options/lro';\nimport type {ResolvedClientConfig} from './transport';\nimport {resolveClientConfig} from './transport';\nimport {\n buildHttpRequest,\n executeCall,\n executeHttpCall,\n marshalRequest,\n parseResponse,\n executeWait,\n StillRunningError,\n} from './utils';\nimport pkgJson from '../../package.json' with {type: 'json'};\nimport type {\n CreateForecastingExperimentRequest,\n CreateForecastingExperimentResponse,\n ForecastingExperiment,\n GetForecastingExperimentRequest,\n} from './model';\nimport {\n ForecastingExperiment_State,\n marshalCreateForecastingExperimentRequestSchema,\n unmarshalCreateForecastingExperimentResponseSchema,\n unmarshalForecastingExperimentSchema,\n} from './model';\n\n// Package identity segment for this client to be used in the User-Agent header.\nconst PACKAGE_SEGMENT = {\n key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\\/sdk-/, ''),\n value: pkgJson.version,\n};\n\nexport class ForecastingClient {\n private readonly options: ClientOptions;\n private readonly logger: Logger;\n // User-Agent header value. Composed once at construction from\n // createDefault() merged with this package's identity and the active\n // credential's name.\n private readonly userAgent: string;\n // Memoized configuration. The profile is resolved once, lazily, on the first\n // request, then reused; host, workspaceId/accountId, and credentials are\n // filled from it when not set explicitly on the options.\n private config: Promise<ResolvedClientConfig> | undefined;\n\n constructor(options: ClientOptions) {\n this.options = options;\n this.logger = options.logger ?? new NoOpLogger();\n const info = createDefault()\n .with(PACKAGE_SEGMENT)\n .with({key: 'sdk-js-auth', value: AUTH_VERSION})\n .with({key: 'auth', value: options.credentials?.name() ?? 'default'});\n this.userAgent = info.toString();\n }\n\n private resolveConfig(): Promise<ResolvedClientConfig> {\n this.config ??= resolveClientConfig(this.options);\n return this.config;\n }\n\n /** Creates a serverless forecasting experiment. Returns the experiment ID. */\n private async createForecastingExperimentBase(\n req: CreateForecastingExperimentRequest,\n options?: CallOptions\n ): Promise<CreateForecastingExperimentResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/automl/create-forecasting-experiment`;\n const body = marshalRequest(\n req,\n marshalCreateForecastingExperimentRequestSchema\n );\n let resp: CreateForecastingExperimentResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers({'Content-Type': 'application/json'});\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalCreateForecastingExperimentResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /** Creates a serverless forecasting experiment. Returns the experiment ID. */\n async createForecastingExperiment(\n req: CreateForecastingExperimentRequest,\n options?: CallOptions\n ): Promise<CreateForecastingExperimentWaiter> {\n const resp = await this.createForecastingExperimentBase(req, options);\n if (resp.experimentId === undefined) {\n throw new Error(\n 'response field experimentId required for polling is missing'\n );\n }\n return new CreateForecastingExperimentWaiter(this, resp.experimentId);\n }\n\n /** Public RPC to get forecasting experiment */\n async getForecastingExperiment(\n req: GetForecastingExperimentRequest,\n options?: CallOptions\n ): Promise<ForecastingExperiment> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/automl/get-forecasting-experiment/${req.experimentId ?? ''}`;\n let resp: ForecastingExperiment | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('GET', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalForecastingExperimentSchema);\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n}\n\nexport class CreateForecastingExperimentWaiter {\n constructor(\n private readonly client: ForecastingClient,\n readonly experimentId: string\n ) {}\n\n /**\n * Polls until the operation reaches a terminal state.\n *\n * Throws if a failure state is reached.\n */\n async wait(options?: LroOptions): Promise<ForecastingExperiment> {\n let result: ForecastingExperiment | undefined;\n\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const pollResp = await this.client.getForecastingExperiment(\n {\n experimentId: this.experimentId,\n },\n callSignal !== undefined ? {signal: callSignal} : undefined\n );\n\n const status = pollResp.state;\n if (status === undefined) {\n throw new Error('response missing required status field');\n }\n\n switch (status) {\n case ForecastingExperiment_State.SUCCEEDED:\n result = pollResp;\n return;\n case ForecastingExperiment_State.FAILED:\n case ForecastingExperiment_State.CANCELLED: {\n const msg = '(no message)';\n throw new Error(`terminal state ${status}: ${msg}`);\n }\n default:\n throw new StillRunningError();\n }\n };\n\n await executeWait(call, options);\n if (result === undefined) {\n throw new Error('operation completed without a result.');\n }\n return result;\n }\n\n /** Checks whether the operation has reached a terminal state. */\n async done(options?: CallOptions): Promise<boolean> {\n const pollResp = await this.client.getForecastingExperiment(\n {\n experimentId: this.experimentId,\n },\n options\n );\n\n const status = pollResp.state;\n if (status === undefined) {\n throw new Error('response missing required status field');\n }\n\n switch (status) {\n case ForecastingExperiment_State.SUCCEEDED:\n case ForecastingExperiment_State.FAILED:\n case ForecastingExperiment_State.CANCELLED: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AAO;;;CAIT,MAAM,KAAK,SAAyC;EAQlD,MAAM,UAPW,MAAM,KAAK,OAAO,yBACjC,EACE,cAAc,KAAK,cACpB,EACD,QACD,EAEuB;AACxB,MAAI,WAAW,OACb,OAAM,IAAI,MAAM,yCAAyC;AAG3D,UAAQ,QAAR;GACE,KAAK,4BAA4B;GACjC,KAAK,4BAA4B;GACjC,KAAK,4BAA4B,UAC/B,QAAO;GACT,QACE,QAAO"}
@@ -1,7 +1,3 @@
1
- /**
2
- * @module v1
3
- */
4
- export { ForecastingClient, CreateForecastingExperimentWaiter } from './client';
5
- export { ForecastingExperiment_State } from './model';
6
- export type { CreateForecastingExperimentRequest, CreateForecastingExperimentResponse, ForecastingExperiment, GetForecastingExperimentRequest, } from './model';
7
- //# sourceMappingURL=index.d.ts.map
1
+ import { CreateForecastingExperimentRequest, CreateForecastingExperimentResponse, ForecastingExperiment, ForecastingExperiment_State, GetForecastingExperimentRequest } from "./model.js";
2
+ import { CreateForecastingExperimentWaiter, ForecastingClient } from "./client.js";
3
+ export { type CreateForecastingExperimentRequest, type CreateForecastingExperimentResponse, CreateForecastingExperimentWaiter, ForecastingClient, type ForecastingExperiment, ForecastingExperiment_State, type GetForecastingExperimentRequest };
package/dist/v1/index.js CHANGED
@@ -1,7 +1,4 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- /**
3
- * @module v1
4
- */
5
- export { ForecastingClient, CreateForecastingExperimentWaiter } from './client';
6
- export { ForecastingExperiment_State } from './model';
7
- //# sourceMappingURL=index.js.map
1
+ import { ForecastingExperiment_State } from "./model.js";
2
+ import { CreateForecastingExperimentWaiter, ForecastingClient } from "./client.js";
3
+
4
+ export { CreateForecastingExperimentWaiter, ForecastingClient, ForecastingExperiment_State };
@@ -1,81 +1,80 @@
1
- import { z } from 'zod';
2
- export declare const ForecastingExperiment_State: {
3
- /** The forecasting experiment is pending and has not started yet. */
4
- readonly PENDING: "PENDING";
5
- /** The forecasting experiment is currently running. */
6
- readonly RUNNING: "RUNNING";
7
- /** The forecasting experiment has completed successfully. */
8
- readonly SUCCEEDED: "SUCCEEDED";
9
- /** The forecasting experiment has failed. */
10
- readonly FAILED: "FAILED";
11
- /** The forecasting experiment has been cancelled. */
12
- readonly CANCELLED: "CANCELLED";
1
+ import { z } from "zod";
2
+
3
+ //#region src/v1/model.d.ts
4
+ declare const ForecastingExperiment_State: {
5
+ /** The forecasting experiment is pending and has not started yet. */readonly PENDING: "PENDING"; /** The forecasting experiment is currently running. */
6
+ readonly RUNNING: "RUNNING"; /** The forecasting experiment has completed successfully. */
7
+ readonly SUCCEEDED: "SUCCEEDED"; /** The forecasting experiment has failed. */
8
+ readonly FAILED: "FAILED"; /** The forecasting experiment has been cancelled. */
9
+ readonly CANCELLED: "CANCELLED";
13
10
  };
14
- export type ForecastingExperiment_State = (typeof ForecastingExperiment_State)[keyof typeof ForecastingExperiment_State] | (string & {});
15
- export interface CreateForecastingExperimentRequest {
16
- /** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used as training data for the forecasting model. */
17
- trainDataPath?: string | undefined;
18
- /** The column in the input training table used as the prediction target for model training. The values in this column are used as the ground truth for model training. */
19
- targetColumn?: string | undefined;
20
- /** The column in the input training table that represents each row's timestamp. */
21
- timeColumn?: string | undefined;
22
- /**
23
- * The time interval between consecutive rows in the time series data.
24
- * Possible values include: '1 second', '1 minute', '5 minutes', '10 minutes', '15 minutes', '30 minutes', 'Hourly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly'.
25
- */
26
- forecastGranularity?: string | undefined;
27
- /** The number of time steps into the future to make predictions, calculated as a multiple of forecast_granularity. This value represents how far ahead the model should forecast. */
28
- forecastHorizon?: bigint | undefined;
29
- /** The evaluation metric used to optimize the forecasting model. */
30
- primaryMetric?: string | undefined;
31
- /** List of frameworks to include for model tuning. Possible values are 'Prophet', 'ARIMA', 'DeepAR'. An empty list includes all supported frameworks. */
32
- trainingFrameworks?: string[] | undefined;
33
- /** The path in the workspace to store the created experiment. */
34
- experimentPath?: string | undefined;
35
- /** The maximum duration for the experiment in minutes. The experiment stops automatically if it exceeds this limit. */
36
- maxRuntime?: bigint | undefined;
37
- /** // The column in the training table used for custom data splits. Values must be 'train', 'validate', or 'test'. */
38
- splitColumn?: string | undefined;
39
- /** The column in the training table used to customize weights for each time series. */
40
- customWeightsColumn?: string | undefined;
41
- /** The fully qualified path of a Unity Catalog model, formatted as catalog_name.schema_name.model_name, used to store the best model. */
42
- registerTo?: string | undefined;
43
- /** The region code(s) to automatically add holiday features. Currently supports only one region. */
44
- holidayRegions?: string[] | undefined;
45
- /** The column in the training table used to group the dataset for predicting individual time series. */
46
- timeseriesIdentifierColumns?: string[] | undefined;
47
- /** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used to store predictions. */
48
- predictionDataPath?: string | undefined;
49
- /**
50
- * Specifies the list of feature columns to include in model training. These columns must exist
51
- * in the training data and be of type string, numerical, or boolean. If not specified, no additional
52
- * features will be included.
53
- * Note: Certain columns are automatically handled:
54
- * - Automatically excluded: split_column, target_column, custom_weights_column.
55
- * - Automatically included: time_column.
56
- */
57
- includeFeatures?: string[] | undefined;
58
- /** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used to store future feature data for predictions. */
59
- futureFeatureDataPath?: string | undefined;
11
+ type ForecastingExperiment_State = (typeof ForecastingExperiment_State)[keyof typeof ForecastingExperiment_State] | (string & {});
12
+ interface CreateForecastingExperimentRequest {
13
+ /** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used as training data for the forecasting model. */
14
+ trainDataPath?: string | undefined;
15
+ /** The column in the input training table used as the prediction target for model training. The values in this column are used as the ground truth for model training. */
16
+ targetColumn?: string | undefined;
17
+ /** The column in the input training table that represents each row's timestamp. */
18
+ timeColumn?: string | undefined;
19
+ /**
20
+ * The time interval between consecutive rows in the time series data.
21
+ * Possible values include: '1 second', '1 minute', '5 minutes', '10 minutes', '15 minutes', '30 minutes', 'Hourly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly'.
22
+ */
23
+ forecastGranularity?: string | undefined;
24
+ /** The number of time steps into the future to make predictions, calculated as a multiple of forecast_granularity. This value represents how far ahead the model should forecast. */
25
+ forecastHorizon?: bigint | undefined;
26
+ /** The evaluation metric used to optimize the forecasting model. */
27
+ primaryMetric?: string | undefined;
28
+ /** List of frameworks to include for model tuning. Possible values are 'Prophet', 'ARIMA', 'DeepAR'. An empty list includes all supported frameworks. */
29
+ trainingFrameworks?: string[] | undefined;
30
+ /** The path in the workspace to store the created experiment. */
31
+ experimentPath?: string | undefined;
32
+ /** The maximum duration for the experiment in minutes. The experiment stops automatically if it exceeds this limit. */
33
+ maxRuntime?: bigint | undefined;
34
+ /** // The column in the training table used for custom data splits. Values must be 'train', 'validate', or 'test'. */
35
+ splitColumn?: string | undefined;
36
+ /** The column in the training table used to customize weights for each time series. */
37
+ customWeightsColumn?: string | undefined;
38
+ /** The fully qualified path of a Unity Catalog model, formatted as catalog_name.schema_name.model_name, used to store the best model. */
39
+ registerTo?: string | undefined;
40
+ /** The region code(s) to automatically add holiday features. Currently supports only one region. */
41
+ holidayRegions?: string[] | undefined;
42
+ /** The column in the training table used to group the dataset for predicting individual time series. */
43
+ timeseriesIdentifierColumns?: string[] | undefined;
44
+ /** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used to store predictions. */
45
+ predictionDataPath?: string | undefined;
46
+ /**
47
+ * Specifies the list of feature columns to include in model training. These columns must exist
48
+ * in the training data and be of type string, numerical, or boolean. If not specified, no additional
49
+ * features will be included.
50
+ * Note: Certain columns are automatically handled:
51
+ * - Automatically excluded: split_column, target_column, custom_weights_column.
52
+ * - Automatically included: time_column.
53
+ */
54
+ includeFeatures?: string[] | undefined;
55
+ /** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used to store future feature data for predictions. */
56
+ futureFeatureDataPath?: string | undefined;
60
57
  }
61
- export interface CreateForecastingExperimentResponse {
62
- /** The unique ID of the created forecasting experiment */
63
- experimentId?: string | undefined;
58
+ interface CreateForecastingExperimentResponse {
59
+ /** The unique ID of the created forecasting experiment */
60
+ experimentId?: string | undefined;
64
61
  }
65
62
  /** Represents a forecasting experiment with its unique identifier, URL, and state. */
66
- export interface ForecastingExperiment {
67
- /** The unique ID for the forecasting experiment. */
68
- experimentId?: string | undefined;
69
- /** The URL to the forecasting experiment page. */
70
- experimentPageUrl?: string | undefined;
71
- /** The current state of the forecasting experiment. */
72
- state?: ForecastingExperiment_State | undefined;
63
+ interface ForecastingExperiment {
64
+ /** The unique ID for the forecasting experiment. */
65
+ experimentId?: string | undefined;
66
+ /** The URL to the forecasting experiment page. */
67
+ experimentPageUrl?: string | undefined;
68
+ /** The current state of the forecasting experiment. */
69
+ state?: ForecastingExperiment_State | undefined;
73
70
  }
74
- export interface GetForecastingExperimentRequest {
75
- /** The unique ID of a forecasting experiment */
76
- experimentId?: string | undefined;
71
+ interface GetForecastingExperimentRequest {
72
+ /** The unique ID of a forecasting experiment */
73
+ experimentId?: string | undefined;
77
74
  }
78
- export declare const unmarshalCreateForecastingExperimentResponseSchema: z.ZodType<CreateForecastingExperimentResponse>;
79
- export declare const unmarshalForecastingExperimentSchema: z.ZodType<ForecastingExperiment>;
80
- export declare const marshalCreateForecastingExperimentRequestSchema: z.ZodType;
75
+ declare const unmarshalCreateForecastingExperimentResponseSchema: z.ZodType<CreateForecastingExperimentResponse>;
76
+ declare const unmarshalForecastingExperimentSchema: z.ZodType<ForecastingExperiment>;
77
+ declare const marshalCreateForecastingExperimentRequestSchema: z.ZodType;
78
+ //#endregion
79
+ export { CreateForecastingExperimentRequest, CreateForecastingExperimentResponse, ForecastingExperiment, ForecastingExperiment_State, GetForecastingExperimentRequest, marshalCreateForecastingExperimentRequestSchema, unmarshalCreateForecastingExperimentResponseSchema, unmarshalForecastingExperimentSchema };
81
80
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3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