@databricks/appkit-ui 0.88.1 → 0.90.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.
Files changed (150) hide show
  1. package/CLAUDE.md +7 -2
  2. package/dist/cli/commands/doctor/checks-existence.js +16 -16
  3. package/dist/cli/commands/doctor/checks-existence.js.map +1 -1
  4. package/dist/cli/commands/doctor/checks.js +15 -18
  5. package/dist/cli/commands/doctor/checks.js.map +1 -1
  6. package/dist/cli/commands/doctor/databricks-client.js +8 -6
  7. package/dist/cli/commands/doctor/databricks-client.js.map +1 -1
  8. package/dist/cli/commands/registry/add.js +6 -9
  9. package/dist/cli/commands/registry/add.js.map +1 -1
  10. package/dist/cli/commands/registry/client.js +9 -31
  11. package/dist/cli/commands/registry/client.js.map +1 -1
  12. package/dist/cli/commands/registry/constants.js +2 -41
  13. package/dist/cli/commands/registry/constants.js.map +1 -1
  14. package/dist/cli/commands/registry/info.js +1 -3
  15. package/dist/cli/commands/registry/info.js.map +1 -1
  16. package/dist/cli/commands/registry/list.js +5 -13
  17. package/dist/cli/commands/registry/list.js.map +1 -1
  18. package/dist/cli/commands/registry/workspace-picker.js +34 -24
  19. package/dist/cli/commands/registry/workspace-picker.js.map +1 -1
  20. package/dist/react/genie/genie-chart-inference.js.map +1 -1
  21. package/dist/react/genie/genie-query-transform.d.ts +5 -2
  22. package/dist/react/genie/genie-query-transform.d.ts.map +1 -1
  23. package/dist/react/genie/genie-query-transform.js +14 -8
  24. package/dist/react/genie/genie-query-transform.js.map +1 -1
  25. package/dist/react/ui/button.d.ts +1 -1
  26. package/dist/shared/src/genie.d.ts +9 -3
  27. package/dist/shared/src/genie.d.ts.map +1 -1
  28. package/dist/shared/src/workspace-client/factory.d.ts +0 -1
  29. package/dist/shared/src/workspace-client/index.d.ts +1 -2
  30. package/dist/shared/src/workspace-client/modular.d.ts +19 -0
  31. package/dist/shared/src/workspace-client/types.d.ts +1 -2
  32. package/dist/workspace-client/client.js +81 -23
  33. package/dist/workspace-client/client.js.map +1 -1
  34. package/dist/workspace-client/errors.d.ts +14 -2
  35. package/dist/workspace-client/errors.d.ts.map +1 -0
  36. package/dist/workspace-client/errors.js +45 -2
  37. package/dist/workspace-client/errors.js.map +1 -0
  38. package/dist/workspace-client/factory.d.ts +1 -1
  39. package/dist/workspace-client/factory.js.map +1 -1
  40. package/dist/workspace-client/index.d.ts +4 -3
  41. package/dist/workspace-client/index.js +2 -2
  42. package/dist/workspace-client/modular.d.ts +109 -0
  43. package/dist/workspace-client/modular.d.ts.map +1 -0
  44. package/dist/workspace-client/modular.js +447 -0
  45. package/dist/workspace-client/modular.js.map +1 -0
  46. package/dist/workspace-client/options.d.ts +29 -0
  47. package/dist/workspace-client/options.d.ts.map +1 -0
  48. package/dist/workspace-client/types.d.ts +35 -38
  49. package/dist/workspace-client/types.d.ts.map +1 -1
  50. package/docs/api/appkit/Class.ApiError.md +110 -0
  51. package/docs/api/appkit/Class.DatabricksAdapter.md +2 -2
  52. package/docs/api/appkit/Class.SupervisorApiAdapter.md +1 -1
  53. package/docs/api/appkit/Function.generateDatabaseCredential.md +2 -2
  54. package/docs/api/appkit/Function.getWorkspaceClient.md +2 -2
  55. package/docs/api/appkit/Interface.DirectoryEntry.md +62 -0
  56. package/docs/api/appkit/Interface.DownloadResponse.md +45 -0
  57. package/docs/api/appkit/Interface.JobAPI.md +20 -12
  58. package/docs/api/appkit/Interface.LakebasePoolConfig.md +1 -1
  59. package/docs/api/appkit/Interface.WorkspaceClient.md +168 -26
  60. package/docs/api/appkit/Interface.WorkspaceClientOptions.md +1 -14
  61. package/docs/api/appkit/TypeAlias.FilesDirectoryEntry.md +8 -0
  62. package/docs/api/appkit/TypeAlias.FilesDownloadResponse.md +8 -0
  63. package/docs/api/appkit/TypeAlias.IDatabaseConfig.md +12 -0
  64. package/docs/api/appkit/TypeAlias.JobsExport.md +1 -1
  65. package/docs/api/appkit/TypeAlias.WorkspaceClientLike.md +16 -0
  66. package/docs/api/appkit.md +7 -2
  67. package/docs/plugins/database.md +11 -0
  68. package/docs/plugins/files.md +20 -3
  69. package/docs/plugins/jobs.md +9 -9
  70. package/docs/plugins/lakebase.md +3 -1
  71. package/docs/plugins/testing.md +10 -8
  72. package/llms.txt +7 -2
  73. package/node_modules/@databricks/sdk-genie/LICENSE +203 -0
  74. package/node_modules/@databricks/sdk-genie/README.md +23 -0
  75. package/node_modules/@databricks/sdk-genie/dist/package.js +7 -0
  76. package/node_modules/@databricks/sdk-genie/dist/package.js.map +1 -0
  77. package/node_modules/@databricks/sdk-genie/dist/v1/client.d.ts +175 -0
  78. package/node_modules/@databricks/sdk-genie/dist/v1/client.d.ts.map +1 -0
  79. package/node_modules/@databricks/sdk-genie/dist/v1/client.js +829 -0
  80. package/node_modules/@databricks/sdk-genie/dist/v1/client.js.map +1 -0
  81. package/node_modules/@databricks/sdk-genie/dist/v1/index.d.ts +3 -0
  82. package/node_modules/@databricks/sdk-genie/dist/v1/index.js +4 -0
  83. package/node_modules/@databricks/sdk-genie/dist/v1/model.d.ts +1799 -0
  84. package/node_modules/@databricks/sdk-genie/dist/v1/model.d.ts.map +1 -0
  85. package/node_modules/@databricks/sdk-genie/dist/v1/model.js +1097 -0
  86. package/node_modules/@databricks/sdk-genie/dist/v1/model.js.map +1 -0
  87. package/node_modules/@databricks/sdk-genie/dist/v1/transport.d.ts +37 -0
  88. package/node_modules/@databricks/sdk-genie/dist/v1/transport.d.ts.map +1 -0
  89. package/node_modules/@databricks/sdk-genie/dist/v1/transport.js +73 -0
  90. package/node_modules/@databricks/sdk-genie/dist/v1/transport.js.map +1 -0
  91. package/node_modules/@databricks/sdk-genie/dist/v1/utils.d.ts +43 -0
  92. package/node_modules/@databricks/sdk-genie/dist/v1/utils.d.ts.map +1 -0
  93. package/node_modules/@databricks/sdk-genie/dist/v1/utils.js +130 -0
  94. package/node_modules/@databricks/sdk-genie/dist/v1/utils.js.map +1 -0
  95. package/node_modules/@databricks/sdk-genie/package.json +46 -0
  96. package/node_modules/@databricks/sdk-statementexecution/LICENSE +203 -0
  97. package/node_modules/@databricks/sdk-statementexecution/README.md +23 -0
  98. package/node_modules/@databricks/sdk-statementexecution/dist/package.js +7 -0
  99. package/node_modules/@databricks/sdk-statementexecution/dist/package.js.map +1 -0
  100. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.d.ts +91 -0
  101. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.d.ts.map +1 -0
  102. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.js +183 -0
  103. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.js.map +1 -0
  104. package/node_modules/@databricks/sdk-statementexecution/dist/v1/index.d.ts +3 -0
  105. package/node_modules/@databricks/sdk-statementexecution/dist/v1/index.js +4 -0
  106. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.d.ts +506 -0
  107. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.d.ts.map +1 -0
  108. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.js +302 -0
  109. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.js.map +1 -0
  110. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.d.ts +37 -0
  111. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.d.ts.map +1 -0
  112. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.js +73 -0
  113. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.js.map +1 -0
  114. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.d.ts +25 -0
  115. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.d.ts.map +1 -0
  116. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.js +87 -0
  117. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.js.map +1 -0
  118. package/node_modules/@databricks/sdk-statementexecution/package.json +46 -0
  119. package/node_modules/@databricks/sdk-vectorsearch/LICENSE +203 -0
  120. package/node_modules/@databricks/sdk-vectorsearch/README.md +23 -0
  121. package/node_modules/@databricks/sdk-vectorsearch/dist/package.js +7 -0
  122. package/node_modules/@databricks/sdk-vectorsearch/dist/package.js.map +1 -0
  123. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.d.ts +70 -0
  124. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.d.ts.map +1 -0
  125. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.js +474 -0
  126. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.js.map +1 -0
  127. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/index.d.ts +3 -0
  128. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/index.js +4 -0
  129. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.d.ts +704 -0
  130. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.d.ts.map +1 -0
  131. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.js +635 -0
  132. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.js.map +1 -0
  133. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.d.ts +37 -0
  134. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.d.ts.map +1 -0
  135. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.js +73 -0
  136. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.js.map +1 -0
  137. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.d.ts +37 -0
  138. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.d.ts.map +1 -0
  139. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.js +104 -0
  140. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.js.map +1 -0
  141. package/node_modules/@databricks/sdk-vectorsearch/package.json +46 -0
  142. package/package.json +29 -4
  143. package/sbom.cdx.json +1 -1
  144. package/dist/shared/src/workspace-client/errors.d.ts +0 -1
  145. package/dist/shared/src/workspace-client/legacy.d.ts +0 -3
  146. package/dist/workspace-client/legacy.d.ts +0 -34
  147. package/dist/workspace-client/legacy.d.ts.map +0 -1
  148. package/dist/workspace-client/legacy.js +0 -23
  149. package/dist/workspace-client/legacy.js.map +0 -1
  150. package/docs/api/appkit/Interface.WorkspaceClientLike.md +0 -67
@@ -0,0 +1,506 @@
1
+ import { z } from "zod";
2
+ import { JsonValue } from "@databricks/sdk-core/wkt";
3
+
4
+ //#region src/v1/model.d.ts
5
+ /** The name of the base data type. This doesn't include details for complex types such as STRUCT, MAP or ARRAY. */
6
+ declare const ColumnTypeName: {
7
+ readonly BOOLEAN: "BOOLEAN";
8
+ readonly BYTE: "BYTE";
9
+ readonly SHORT: "SHORT";
10
+ readonly INT: "INT";
11
+ readonly LONG: "LONG";
12
+ readonly FLOAT: "FLOAT";
13
+ readonly DOUBLE: "DOUBLE";
14
+ readonly DATE: "DATE";
15
+ readonly TIMESTAMP: "TIMESTAMP";
16
+ readonly STRING: "STRING";
17
+ readonly BINARY: "BINARY";
18
+ readonly DECIMAL: "DECIMAL";
19
+ readonly INTERVAL: "INTERVAL";
20
+ readonly ARRAY: "ARRAY";
21
+ readonly STRUCT: "STRUCT";
22
+ readonly MAP: "MAP";
23
+ readonly CHAR: "CHAR";
24
+ readonly NULL: "NULL";
25
+ readonly USER_DEFINED_TYPE: "USER_DEFINED_TYPE";
26
+ };
27
+ type ColumnTypeName = (typeof ColumnTypeName)[keyof typeof ColumnTypeName] | (string & {});
28
+ declare const Disposition: {
29
+ readonly FETCH_DISPOSITION_UNSPECIFIED: "FETCH_DISPOSITION_UNSPECIFIED";
30
+ readonly INLINE: "INLINE";
31
+ readonly EXTERNAL_LINKS: "EXTERNAL_LINKS";
32
+ };
33
+ type Disposition = (typeof Disposition)[keyof typeof Disposition] | (string & {});
34
+ declare const Format: {
35
+ readonly FORMAT_UNSPECIFIED: "FORMAT_UNSPECIFIED";
36
+ readonly JSON_ARRAY: "JSON_ARRAY";
37
+ readonly ARROW_STREAM: "ARROW_STREAM";
38
+ readonly CSV: "CSV";
39
+ };
40
+ type Format = (typeof Format)[keyof typeof Format] | (string & {});
41
+ declare const ServiceErrorCode: {
42
+ readonly UNKNOWN: "UNKNOWN";
43
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
44
+ readonly TEMPORARILY_UNAVAILABLE: "TEMPORARILY_UNAVAILABLE";
45
+ readonly IO_ERROR: "IO_ERROR";
46
+ readonly BAD_REQUEST: "BAD_REQUEST";
47
+ readonly SERVICE_UNDER_MAINTENANCE: "SERVICE_UNDER_MAINTENANCE";
48
+ readonly WORKSPACE_TEMPORARILY_UNAVAILABLE: "WORKSPACE_TEMPORARILY_UNAVAILABLE";
49
+ readonly DEADLINE_EXCEEDED: "DEADLINE_EXCEEDED";
50
+ readonly CANCELLED: "CANCELLED";
51
+ readonly RESOURCE_EXHAUSTED: "RESOURCE_EXHAUSTED";
52
+ readonly ABORTED: "ABORTED";
53
+ readonly NOT_FOUND: "NOT_FOUND";
54
+ readonly ALREADY_EXISTS: "ALREADY_EXISTS";
55
+ readonly UNAUTHENTICATED: "UNAUTHENTICATED";
56
+ };
57
+ type ServiceErrorCode = (typeof ServiceErrorCode)[keyof typeof ServiceErrorCode] | (string & {});
58
+ /**
59
+ * When `wait_timeout > 0s`, the call will block up to the specified time. If the statement execution doesn't
60
+ * finish within this time, `on_wait_timeout` determines whether the execution should continue or be canceled.
61
+ * When set to `CONTINUE`, the statement execution continues asynchronously and the call returns a statement ID
62
+ * which can be used for polling with :method:statementexecution/getStatement. When set to `CANCEL`,
63
+ * the statement execution is canceled and the call returns with a `CANCELED` state.
64
+ */
65
+ declare const TimeoutAction: {
66
+ readonly TIMEOUT_ACTION_UNSPECIFIED: "TIMEOUT_ACTION_UNSPECIFIED";
67
+ readonly CONTINUE: "CONTINUE";
68
+ readonly CANCEL: "CANCEL";
69
+ };
70
+ type TimeoutAction = (typeof TimeoutAction)[keyof typeof TimeoutAction] | (string & {});
71
+ declare const StatementStatus_State: {
72
+ readonly STATE_UNSPECIFIED: "STATE_UNSPECIFIED";
73
+ readonly PENDING: "PENDING";
74
+ readonly RUNNING: "RUNNING";
75
+ readonly SUCCEEDED: "SUCCEEDED";
76
+ readonly FAILED: "FAILED";
77
+ readonly CANCELED: "CANCELED";
78
+ readonly CLOSED: "CLOSED";
79
+ };
80
+ type StatementStatus_State = (typeof StatementStatus_State)[keyof typeof StatementStatus_State] | (string & {});
81
+ interface CancelStatementRequest {
82
+ /**
83
+ * The statement ID is returned upon successfully submitting a SQL statement, and is a required
84
+ * reference for all subsequent calls.
85
+ */
86
+ statementId?: string | undefined;
87
+ }
88
+ interface CancelStatementResponse {}
89
+ interface ChunkInfo {
90
+ /** The position within the sequence of result set chunks. */
91
+ chunkIndex?: number | undefined;
92
+ /** The starting row offset within the result set. */
93
+ rowOffset?: bigint | undefined;
94
+ /** The number of rows within the result chunk. */
95
+ rowCount?: bigint | undefined;
96
+ /**
97
+ * The number of bytes in the result chunk. This field is not available when using `INLINE`
98
+ * disposition.
99
+ */
100
+ byteCount?: bigint | undefined;
101
+ /**
102
+ * When fetching, provides the `chunk_index` for the _next_ chunk. If absent, indicates there are no
103
+ * more chunks. The next chunk can be fetched with a
104
+ * :method:statementexecution/getstatementresultchunkn request.
105
+ */
106
+ nextChunkIndex?: number | undefined;
107
+ /**
108
+ * When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more
109
+ * chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and should be
110
+ * treated as an opaque link. This is an alternative to using `next_chunk_index`.
111
+ */
112
+ nextChunkInternalLink?: string | undefined;
113
+ }
114
+ interface ColumnInfo {
115
+ /** The name of the column. */
116
+ name?: string | undefined;
117
+ /** The full SQL type specification. */
118
+ typeText?: string | undefined;
119
+ /** The name of the base data type. This doesn't include details for complex types such as STRUCT, MAP or ARRAY. */
120
+ typeName?: ColumnTypeName | undefined;
121
+ /** The ordinal position of the column (starting at position 0). */
122
+ position?: number | undefined;
123
+ /** Specifies the number of digits in a number. This applies to the DECIMAL type. */
124
+ typePrecision?: number | undefined;
125
+ /** Specifies the number of digits to the right of the decimal point in a number. This applies to the DECIMAL type. */
126
+ typeScale?: number | undefined;
127
+ /** The format of the interval type. */
128
+ typeIntervalType?: string | undefined;
129
+ }
130
+ interface ExecuteStatementRequest {
131
+ /**
132
+ * The SQL statement to execute. The statement can optionally be parameterized, see `parameters`.
133
+ * The maximum query text size is 16 MiB.
134
+ */
135
+ statement?: string | undefined;
136
+ /**
137
+ * Warehouse upon which to execute a statement. See also
138
+ * [What are SQL warehouses?](https://docs.databricks.com/sql/admin/warehouse-type.html)
139
+ */
140
+ warehouseId?: string | undefined;
141
+ /**
142
+ * Sets default catalog for statement execution, similar to
143
+ * [`USE CATALOG`](https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-catalog.html)
144
+ * in SQL.
145
+ */
146
+ catalog?: string | undefined;
147
+ /**
148
+ * Sets default schema for statement execution, similar to
149
+ * [`USE SCHEMA`](https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-schema.html)
150
+ * in SQL.
151
+ */
152
+ schema?: string | undefined;
153
+ /**
154
+ * Applies the given row limit to the statement's result set, but unlike the `LIMIT` clause in SQL,
155
+ * it also sets the `truncated` field in the response to indicate whether the result was trimmed due to the limit or
156
+ * not.
157
+ */
158
+ rowLimit?: bigint | undefined;
159
+ /**
160
+ * Applies the given byte limit to the statement's result size. Byte counts are based on internal data
161
+ * representations and might not match the final size in the requested `format`. If the result was truncated due to
162
+ * the byte limit, then `truncated` in the response is set to `true`.
163
+ * When using `EXTERNAL_LINKS` disposition, a default `byte_limit` of 100 GiB is applied if `byte_limit` is not
164
+ * explicitly set.
165
+ */
166
+ byteLimit?: bigint | undefined;
167
+ /**
168
+ * Statement execution supports three result formats: `JSON_ARRAY` (default), `ARROW_STREAM`, and `CSV`.
169
+ *
170
+ * Important: The formats `ARROW_STREAM` and `CSV` are supported only with `EXTERNAL_LINKS` disposition.
171
+ * `JSON_ARRAY` is supported in `INLINE` and `EXTERNAL_LINKS` disposition.
172
+ *
173
+ * When specifying `format=JSON_ARRAY`, result data will be formatted as an array of arrays of values, where each
174
+ * value is either the *string representation* of a value, or `null`.
175
+ * For example, the output of `SELECT concat('id-', id) AS strCol, id AS intCol, null AS nullCol FROM range(3)` would
176
+ * look like this:
177
+ *
178
+ * ```
179
+ * [
180
+ * [ "id-1", "1", null ],
181
+ * [ "id-2", "2", null ],
182
+ * [ "id-3", "3", null ],
183
+ * ]
184
+ * ```
185
+ *
186
+ * When specifying `format=JSON_ARRAY` and `disposition=EXTERNAL_LINKS`, each chunk in the result contains compact
187
+ * JSON with no indentation or extra whitespace.
188
+ *
189
+ * When specifying `format=ARROW_STREAM` and `disposition=EXTERNAL_LINKS`, each chunk in the result will be formatted
190
+ * as Apache Arrow Stream. See the
191
+ * [Apache Arrow streaming format](https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format).
192
+ *
193
+ * When specifying `format=CSV` and `disposition=EXTERNAL_LINKS`, each chunk in the result will be a CSV according to
194
+ * [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180) standard.
195
+ * All the columns values will have *string representation* similar to the `JSON_ARRAY` format, and `null` values will
196
+ * be encoded as “null”.
197
+ * Only the first chunk in the result would contain a header row with column names.
198
+ * For example, the output of `SELECT concat('id-', id) AS strCol, id AS intCol, null as nullCol FROM range(3)` would
199
+ * look like this:
200
+ *
201
+ * ```
202
+ * strCol,intCol,nullCol
203
+ * id-1,1,null
204
+ * id-2,2,null
205
+ * id-3,3,null
206
+ * ```
207
+ */
208
+ format?: Format | undefined;
209
+ /**
210
+ * The fetch disposition provides two modes of fetching results: `INLINE` and `EXTERNAL_LINKS`.
211
+ *
212
+ * Statements executed with `INLINE` disposition will return result data inline, in `JSON_ARRAY` format, in a series
213
+ * of chunks. If a given statement produces a result set with a size larger than 25 MiB,
214
+ * that statement execution is aborted, and no result set will be available.
215
+ *
216
+ * **NOTE**
217
+ * Byte limits are computed based upon internal representations of the result set data, and might not match the sizes
218
+ * visible in JSON responses.
219
+ *
220
+ * Statements executed with `EXTERNAL_LINKS` disposition will return result data as external links: URLs that point
221
+ * to cloud storage internal to the workspace. Using `EXTERNAL_LINKS` disposition allows statements to generate
222
+ * arbitrarily sized result sets for fetching up to 100 GiB. The resulting links have two important properties:
223
+ *
224
+ * 1. They point to resources _external_ to the <Databricks> compute; therefore any associated authentication
225
+ * information (typically a personal access token, OAuth token, or similar) _must be removed_ when fetching from
226
+ * these links.
227
+ *
228
+ * 2. These are short-lived cloud-storage URLs
229
+ * with a specific expiration, indicated in the response. The behavior when attempting to use an expired link is
230
+ * cloud specific.
231
+ */
232
+ disposition?: Disposition | undefined;
233
+ /**
234
+ * The time in seconds the call will wait for the statement's result set as `Ns`, where `N` can be set to 0 or to a
235
+ * value between 5 and 50.
236
+ *
237
+ * When set to `0s`, the statement will execute in asynchronous mode and the call will not wait for the execution to
238
+ * finish. In this case, the call returns directly with `PENDING` state and a statement ID which can be used for
239
+ * polling with :method:statementexecution/getStatement.
240
+ *
241
+ * When set between 5 and 50 seconds, the call will behave synchronously up to this timeout and wait for the statement
242
+ * execution to finish. If the execution finishes within this time, the call returns immediately with a manifest and
243
+ * result data (or a `FAILED` state in case of an execution error). If the statement takes longer to execute,
244
+ * `on_wait_timeout` determines what should happen after the timeout is reached.
245
+ */
246
+ waitTimeout?: string | undefined;
247
+ /**
248
+ * When `wait_timeout > 0s`, the call will block up to the specified time. If the statement execution doesn't
249
+ * finish within this time, `on_wait_timeout` determines whether the execution should continue or be canceled.
250
+ * When set to `CONTINUE`, the statement execution continues asynchronously and the call returns a statement ID
251
+ * which can be used for polling with :method:statementexecution/getStatement. When set to `CANCEL`,
252
+ * the statement execution is canceled and the call returns with a `CANCELED` state.
253
+ */
254
+ onWaitTimeout?: TimeoutAction | undefined;
255
+ /**
256
+ * A list of parameters to pass into a SQL statement containing parameter markers. A
257
+ * parameter consists of a name, a value, and optionally a type. To represent a NULL
258
+ * value, the `value` field may be omitted or set to `null` explicitly. If the `type` field
259
+ * is omitted, the value is interpreted as a string.
260
+ *
261
+ * If the type is given, parameters will be checked for type correctness according
262
+ * to the given type. A value is correct if the provided string can be converted to
263
+ * the requested type using the `cast` function. The exact semantics are described in
264
+ * the section [`cast` function](https://docs.databricks.com/sql/language-manual/functions/cast.html) of the SQL language reference.
265
+ *
266
+ * For example, the following statement contains two parameters, `my_name` and `my_date`:
267
+ *
268
+ * ```
269
+ * SELECT * FROM my_table WHERE name = :my_name AND date = :my_date
270
+ * ```
271
+ *
272
+ * The parameters can be passed in the request body as follows:
273
+ *
274
+ * `
275
+ * {
276
+ * ...,
277
+ * "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date",
278
+ * "parameters": [
279
+ * { "name": "my_name", "value": "the name" },
280
+ * { "name": "my_date", "value": "2020-01-01", "type": "DATE" }
281
+ * ]
282
+ * }
283
+ * `
284
+ *
285
+ * Currently, positional parameters denoted by a `?` marker are not supported by the
286
+ * Databricks SQL Statement Execution API.
287
+ *
288
+ * Also see the section [Parameter markers](https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html) of the SQL language reference.
289
+ */
290
+ parameters?: StatementParameter[] | undefined;
291
+ /**
292
+ * An array of query tags to annotate a SQL statement. A query tag
293
+ * consists of a non-empty key and, optionally, a value. To represent a NULL
294
+ * value, either omit the `value` field or manually set it to `null` or white space.
295
+ * Refer to the SQL language reference for the format specification of query tags.
296
+ * There's no significance to the order of tags. Only one value per key will be recorded.
297
+ * A sequence in excess of 20 query tags will be coerced to 20.
298
+ * Example:
299
+ *
300
+ * {
301
+ * ...,
302
+ * "query_tags": [
303
+ * { "key": "team", "value": "eng" },
304
+ * { "key": "some key only tag" }
305
+ * ]
306
+ * }
307
+ */
308
+ queryTags?: QueryTag[] | undefined;
309
+ }
310
+ interface ExternalLink {
311
+ /**
312
+ * A short-lived cloud-storage URL pointing to a chunk of result data, hosted by an external service, with a short
313
+ * expiration time (<= 15 minutes). As this URL contains a temporary credential, it should be considered sensitive
314
+ * and the client should not expose this URL in a log.
315
+ */
316
+ externalLink?: string | undefined;
317
+ /**
318
+ * Indicates the date-time that the given external link will expire and
319
+ * becomes invalid, after which point a new `external_link` must be requested.
320
+ */
321
+ expiration?: string | undefined;
322
+ /**
323
+ * HTTP headers that must be included with a GET request to the `external_link`.
324
+ * Each header is provided as a key-value pair.
325
+ * Headers are typically used to pass a decryption key to the external service.
326
+ * The values of these headers should be considered sensitive and the client should not expose
327
+ * these values in a log.
328
+ */
329
+ httpHeaders?: Record<string, string> | undefined;
330
+ /** The position within the sequence of result set chunks. */
331
+ chunkIndex?: number | undefined;
332
+ /** The starting row offset within the result set. */
333
+ rowOffset?: bigint | undefined;
334
+ /** The number of rows within the result chunk. */
335
+ rowCount?: bigint | undefined;
336
+ /**
337
+ * The number of bytes in the result chunk. This field is not available when using `INLINE`
338
+ * disposition.
339
+ */
340
+ byteCount?: bigint | undefined;
341
+ /**
342
+ * When fetching, provides the `chunk_index` for the _next_ chunk. If absent, indicates there are no
343
+ * more chunks. The next chunk can be fetched with a
344
+ * :method:statementexecution/getstatementresultchunkn request.
345
+ */
346
+ nextChunkIndex?: number | undefined;
347
+ /**
348
+ * When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more
349
+ * chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and should be
350
+ * treated as an opaque link. This is an alternative to using `next_chunk_index`.
351
+ */
352
+ nextChunkInternalLink?: string | undefined;
353
+ }
354
+ interface GetResultDataRequest {
355
+ /**
356
+ * The statement ID is returned upon successfully submitting a SQL statement, and is a required
357
+ * reference for all subsequent calls.
358
+ */
359
+ statementId?: string | undefined;
360
+ chunkIndex?: number | undefined;
361
+ }
362
+ interface GetStatementResultRequest {
363
+ /**
364
+ * The statement ID is returned upon successfully submitting a SQL statement, and is a required
365
+ * reference for all subsequent calls.
366
+ */
367
+ statementId?: string | undefined;
368
+ }
369
+ /**
370
+ * * A query execution can be annotated with an optional key-value pair to
371
+ * allow users to attribute the executions by key and optional value to filter by.
372
+ * QueryTag is the user-facing representation.
373
+ */
374
+ interface QueryTag {
375
+ key?: string | undefined;
376
+ value?: string | undefined;
377
+ }
378
+ /**
379
+ * Contains the result data of a single chunk when using `INLINE` disposition. When using
380
+ * `EXTERNAL_LINKS` disposition, the array `external_links` is used instead to provide
381
+ * short-lived cloud-storage URLs to the result data
382
+ * in cloud storage. Exactly one of these alternatives is used. (While the `external_links`
383
+ * array prepares the API to return multiple links in a single response. Currently only a single
384
+ * link is returned.)
385
+ */
386
+ interface ResultData {
387
+ /** PATCH(appkit): Reyden's non-standard INLINE ARROW_STREAM payload (base64 Arrow IPC). */
388
+ attachment?: string | undefined;
389
+ externalLinks?: ExternalLink[] | undefined;
390
+ /**
391
+ * The `JSON_ARRAY` format is an array of arrays of values, where each non-null value is
392
+ * formatted as a string. Null values are encoded as JSON `null`.
393
+ */
394
+ dataArray?: JsonValue[][] | undefined;
395
+ /** The position within the sequence of result set chunks. */
396
+ chunkIndex?: number | undefined;
397
+ /** The starting row offset within the result set. */
398
+ rowOffset?: bigint | undefined;
399
+ /** The number of rows within the result chunk. */
400
+ rowCount?: bigint | undefined;
401
+ /**
402
+ * The number of bytes in the result chunk. This field is not available when using `INLINE`
403
+ * disposition.
404
+ */
405
+ byteCount?: bigint | undefined;
406
+ /**
407
+ * When fetching, provides the `chunk_index` for the _next_ chunk. If absent, indicates there are no
408
+ * more chunks. The next chunk can be fetched with a
409
+ * :method:statementexecution/getstatementresultchunkn request.
410
+ */
411
+ nextChunkIndex?: number | undefined;
412
+ /**
413
+ * When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more
414
+ * chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and should be
415
+ * treated as an opaque link. This is an alternative to using `next_chunk_index`.
416
+ */
417
+ nextChunkInternalLink?: string | undefined;
418
+ }
419
+ /** The result manifest provides schema and metadata for the result set. */
420
+ interface ResultManifest {
421
+ format?: Format | undefined;
422
+ schema?: Schema | undefined;
423
+ /** The total number of chunks that the result set has been divided into. */
424
+ totalChunkCount?: number | undefined;
425
+ /** Array of result set chunk metadata. */
426
+ chunks?: ChunkInfo[] | undefined;
427
+ /** The total number of rows in the result set. */
428
+ totalRowCount?: bigint | undefined;
429
+ /**
430
+ * The total number of bytes in the result set. This field is not available when using `INLINE`
431
+ * disposition.
432
+ */
433
+ totalByteCount?: bigint | undefined;
434
+ /** Indicates whether the result is truncated due to `row_limit` or `byte_limit`. */
435
+ truncated?: boolean | undefined;
436
+ }
437
+ /** The schema is an ordered list of column descriptions. */
438
+ interface Schema {
439
+ columnCount?: number | undefined;
440
+ columns?: ColumnInfo[] | undefined;
441
+ }
442
+ interface ServiceError {
443
+ errorCode?: ServiceErrorCode | undefined;
444
+ /** A brief summary of the error condition. */
445
+ message?: string | undefined;
446
+ }
447
+ interface StatementParameter {
448
+ /** The name of a parameter marker to be substituted in the statement. */
449
+ name?: string | undefined;
450
+ /** The value to substitute, represented as a string. If omitted, the value is interpreted as NULL. */
451
+ value?: string | undefined;
452
+ /**
453
+ * The data type, given as a string. For example: `INT`, `STRING`, `DECIMAL(10,2)`.
454
+ * If no type is given the type is assumed to be `STRING`. Complex types, such as
455
+ * `ARRAY`, `MAP`, and `STRUCT` are not supported. For valid types, refer to the
456
+ * section [Data types](https://docs.databricks.com/sql/language-manual/functions/cast.html) of the SQL language reference.
457
+ */
458
+ type?: string | undefined;
459
+ }
460
+ interface StatementResponse {
461
+ /**
462
+ * The statement ID is returned upon successfully submitting a SQL statement, and is a required
463
+ * reference for all subsequent calls.
464
+ */
465
+ statementId?: string | undefined;
466
+ status?: StatementStatus | undefined;
467
+ manifest?: ResultManifest | undefined;
468
+ result?: ResultData | undefined;
469
+ }
470
+ /** The status response includes execution state and if relevant, error information. */
471
+ interface StatementStatus {
472
+ /**
473
+ * Statement execution state:
474
+ * - `PENDING`: waiting for warehouse
475
+ * - `RUNNING`: running
476
+ * - `SUCCEEDED`: execution was successful, result data available for fetch
477
+ * - `FAILED`: execution failed; reason for failure described in accompanying error message
478
+ * - `CANCELED`: user canceled; can come from explicit cancel call, or timeout with
479
+ * `on_wait_timeout=CANCEL`
480
+ * - `CLOSED`: execution successful, and statement closed; result no longer available for fetch
481
+ */
482
+ state?: StatementStatus_State | undefined;
483
+ error?: ServiceError | undefined;
484
+ /**
485
+ * SQLSTATE error code returned when the statement execution fails.
486
+ * Only populated when the statement status is `FAILED`.
487
+ */
488
+ sqlState?: string | undefined;
489
+ }
490
+ declare const unmarshalCancelStatementResponseSchema: z.ZodType<CancelStatementResponse>;
491
+ declare const unmarshalChunkInfoSchema: z.ZodType<ChunkInfo>;
492
+ declare const unmarshalColumnInfoSchema: z.ZodType<ColumnInfo>;
493
+ declare const unmarshalExternalLinkSchema: z.ZodType<ExternalLink>;
494
+ declare const unmarshalResultDataSchema: z.ZodType<ResultData>;
495
+ declare const unmarshalResultManifestSchema: z.ZodType<ResultManifest>;
496
+ declare const unmarshalSchemaSchema: z.ZodType<Schema>;
497
+ declare const unmarshalServiceErrorSchema: z.ZodType<ServiceError>;
498
+ declare const unmarshalStatementResponseSchema: z.ZodType<StatementResponse>;
499
+ declare const unmarshalStatementStatusSchema: z.ZodType<StatementStatus>;
500
+ declare const marshalCancelStatementRequestSchema: z.ZodType;
501
+ declare const marshalExecuteStatementRequestSchema: z.ZodType;
502
+ declare const marshalQueryTagSchema: z.ZodType;
503
+ declare const marshalStatementParameterSchema: z.ZodType;
504
+ //#endregion
505
+ export { CancelStatementRequest, CancelStatementResponse, ChunkInfo, ColumnInfo, ColumnTypeName, Disposition, ExecuteStatementRequest, ExternalLink, Format, GetResultDataRequest, GetStatementResultRequest, QueryTag, ResultData, ResultManifest, Schema, ServiceError, ServiceErrorCode, StatementParameter, StatementResponse, StatementStatus, StatementStatus_State, TimeoutAction, marshalCancelStatementRequestSchema, marshalExecuteStatementRequestSchema, marshalQueryTagSchema, marshalStatementParameterSchema, unmarshalCancelStatementResponseSchema, unmarshalChunkInfoSchema, unmarshalColumnInfoSchema, unmarshalExternalLinkSchema, unmarshalResultDataSchema, unmarshalResultManifestSchema, unmarshalSchemaSchema, unmarshalServiceErrorSchema, unmarshalStatementResponseSchema, unmarshalStatementStatusSchema };
506
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","names":[],"sources":["../../src/v1/model.ts"],"mappings":";;;;;cAkBa,cAAA;EAAA;;;;;;;;;;;;;;;;;;;;KAqBD,cAAA,WACA,cAAA,eAA6B,cAAA;AAAA,cAI5B,WAAA;EAAA;;;;KAKD,WAAA,WACA,WAAA,eAA0B,WAAA;AAAA,cAIzB,MAAA;EAAA;;;;;KAMD,MAAA,WAAiB,MAAA,eAAqB,MAAA;AAAA,cAGrC,gBAAA;EAAA;;;;;;;;;;;;;;;KAgBD,gBAAA,WACA,gBAAA,eAA+B,gBAAA;;;;AApB3C;;;;cA+Ba,aAAA;EAAA;;;;KAKD,aAAA,WACA,aAAA,eAA4B,aAAA;AAAA,cAI3B,qBAAA;EAAA;;;;;;;;KAUD,qBAAA,WACA,qBAAA,eAAoC,qBAAA;AAAA,UAG/B,sBAAA;;;;;EAKf,WAAA;AAAA;AAAA,UAIe,uBAAA;AAAA,UAEA,SAAA;EAnCJ;EAqCX,UAAA;;EAEA,SAAA;;EAEA,QAAA;;;;AApCF;EAyCE,SAAA;;;;AApCF;;EA0CE,cAAA;EAlCQ;;;;;EAwCR,qBAAA;AAAA;AAAA,UAGe,UAAA;;EAEf,IAAA;EA3CU;EA6CV,QAAA;;EAEA,QAAA,GAAW,cAAA;EA9CwD;EAgDnE,QAAA;EA7CqC;EA+CrC,aAAA;EA1CA;EA4CA,SAAA;EAxCe;EA0Cf,gBAAA;AAAA;AAAA,UAGe,uBAAA;EA7CuB;AAExC;;;EAgDE,SAAA;EA9CA;;;;EAmDA,WAAA;EA9BA;;;AAGF;;EAiCE,OAAA;EA3ByB;;;;;EAiCzB,MAAA;EA7BA;;;;;EAmCA,QAAA;EA5BsC;;;;;;;EAoCtC,SAAA;EA8IoB;;;;;;;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