@malloy-publisher/sdk 0.9.11 → 0.9.12

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.
@@ -1,8 +1,8 @@
1
1
  import { HTMLInputTypeAttribute } from 'react';
2
- import { ConnectionTypeEnum, AzureConnection, BigqueryConnection, DatabricksConnection, DucklakeConnection, GCSConnection, MotherDuckConnection, MysqlConnection, PostgresConnection, S3Connection, SnowflakeConnection, TrinoConnection } from '../../client/api';
2
+ import { ConnectionTypeEnum, AzureConnection, BigqueryConnection, DatabricksConnection, DucklakeConnection, GCSConnection, MotherDuckConnection, MysqlConnection, PostgresConnection, S3Connection, SnowflakeConnection, SqlserverConnection, TrinoConnection } from '../../client/api';
3
3
  type ConnectionField = {
4
4
  label: string;
5
- name: keyof (PostgresConnection & BigqueryConnection & SnowflakeConnection & TrinoConnection & DatabricksConnection & MysqlConnection & MotherDuckConnection & S3Connection & GCSConnection & AzureConnection & DucklakeConnection);
5
+ name: keyof (PostgresConnection & BigqueryConnection & SnowflakeConnection & TrinoConnection & DatabricksConnection & MysqlConnection & SqlserverConnection & MotherDuckConnection & S3Connection & GCSConnection & AzureConnection & DucklakeConnection);
6
6
  type: HTMLInputTypeAttribute;
7
7
  required?: boolean;
8
8
  selectOptions?: Array<{
@@ -16,12 +16,20 @@ type ConnectionField = {
16
16
  };
17
17
  export declare const connectionFieldsByType: Record<ConnectionTypeEnum, Array<ConnectionField>>;
18
18
  export declare const attributesFieldName: Record<ConnectionTypeEnum, string>;
19
+ /**
20
+ * The connection config to send, with each field the API types as an integer
21
+ * or a boolean converted from the form's string, and each optional field in
22
+ * {@link BLANK_MEANS_UNSET} left out when blank. A value that does not parse
23
+ * is sent as collected, so the server's validation names it rather than a
24
+ * silent `NaN`.
25
+ */
26
+ export declare function typedConnectionConfig(type: ConnectionTypeEnum, config: Record<string, string>): Record<string, unknown>;
19
27
  /**
20
28
  * Connection types the Add/Edit dialogs offer as creatable. `publisher` proxy
21
29
  * connections are configured in publisher.config.json rather than through the
22
30
  * UI, so they are a valid ConnectionTypeEnum but not a form choice.
23
31
  */
24
- export declare const uiCreatableConnectionTypes: ("bigquery" | "snowflake" | "postgres" | "trino" | "databricks" | "mysql" | "duckdb" | "motherduck" | "ducklake")[];
32
+ export declare const uiCreatableConnectionTypes: ("bigquery" | "snowflake" | "postgres" | "trino" | "databricks" | "mysql" | "sqlserver" | "duckdb" | "motherduck" | "ducklake")[];
25
33
  export declare const attachedDatabaseConnectionFieldName: Record<string, string>;
26
34
  export declare const s3AttachedDatabaseFields: Array<ConnectionField>;
27
35
  export declare const gcsAttachedDatabaseFields: Array<ConnectionField>;