@databricks/sdk-core 0.48.0 → 0.50.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.
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.48.0";
2
+ var version = "0.50.0";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -19,6 +19,8 @@ interface Profile {
19
19
  workspaceId?: string;
20
20
  /** Databricks Account ID for Accounts API. */
21
21
  accountId?: string;
22
+ /** ID of the group whose role is assumed when obtaining OAuth tokens. */
23
+ groupId?: string;
22
24
  /** Personal access token for PAT authentication. */
23
25
  token?: Secret;
24
26
  /** Selects a specific auth method when multiple credentials are available. */
@@ -1 +1 @@
1
- {"version":3,"file":"profile.d.ts","names":[],"sources":["../../src/profiles/profile.ts"],"mappings":";;;;;;;;UAaiB,OAAA;EAKf;EAHA,IAAA;EAaA;EAVA,IAAA;EAaQ;;;;;EANR,WAAA;EAwBA;EArBA,SAAA;EAqBc;EAlBd,KAAA,GAAQ,MAAA;EA6BO;EA1Bf,QAAA;;EAGA,QAAA;EA6BA;EA1BA,YAAA,GAAe,MAAA;EAuCf;EApCA,iBAAA;EAyCU;;AAOZ;;EA1CE,KAAA,GAAQ,MAAA;AAAA;;AAqDV;;;;;;;UA1CiB,cAAA;EA4CN;;;;;EAtCT,OAAA;EA0Ce;;;;EApCf,UAAA;EAsC+B;;AAMjC;;;EArCE,SAAA;EAqC8C;;;EAhC9C,UAAA;AAAA;;;;;cAOW,gBAAA;;;;;;UAWI,WAAA;;WAEN,KAAA,QAAa,OAAA;EAAA,SACb,MAAA;EAAA,SACA,MAAA;;WAEA,GAAA,GAAM,OAAA,EAAS,OAAA,EAAS,GAAA;;WAExB,GAAA,GAAM,OAAA,EAAS,OAAA;AAAA;;;;cAMb,aAAA,WAAwB,WAAA"}
1
+ {"version":3,"file":"profile.d.ts","names":[],"sources":["../../src/profiles/profile.ts"],"mappings":";;;;;;;;UAaiB,OAAA;EAKf;EAHA,IAAA;EAaA;EAVA,IAAA;EAgBA;;;;;EATA,WAAA;EAqBA;EAlBA,SAAA;EAwBQ;EArBR,OAAA;EAqBc;EAlBd,KAAA,GAAQ,MAAA;EA6BqB;EA1B7B,QAAA;EA0B6B;EAvB7B,QAAA;EAmCA;EAhCA,YAAA,GAAe,MAAA;EA4Cf;EAzCA,iBAAA;EAyCU;AAOZ;;;EA1CE,KAAA,GAAQ,MAAA;AAAA;AAqDV;;;;;;;;AAAA,UA1CiB,cAAA;EA4CO;;;;;EAtCtB,OAAA;EA0CiC;;;;EApCjC,UAAA;EAsC+B;AAMjC;;;;EArCE,SAAA;;;;EAKA,UAAA;AAAA;;;;;cAOW,gBAAA;;;;;;UAWI,WAAA;;WAEN,KAAA,QAAa,OAAA;EAAA,SACb,MAAA;EAAA,SACA,MAAA;;WAEA,GAAA,GAAM,OAAA,EAAS,OAAA,EAAS,GAAA;;WAExB,GAAA,GAAM,OAAA,EAAS,OAAA;AAAA;;;;cAMb,aAAA,WAAwB,WAAA"}
@@ -42,6 +42,15 @@ const PROPERTY_DEFS = [
42
42
  },
43
43
  get: (p) => p.accountId
44
44
  },
45
+ {
46
+ field: "groupId",
47
+ envVar: "DATABRICKS_GROUP_ID",
48
+ iniKey: "group_id",
49
+ set: (p, v) => {
50
+ p.groupId = v;
51
+ },
52
+ get: (p) => p.groupId
53
+ },
45
54
  {
46
55
  field: "token",
47
56
  envVar: "DATABRICKS_TOKEN",
@@ -1 +1 @@
1
- {"version":3,"file":"profile.js","names":[],"sources":["../../src/profiles/profile.ts"],"sourcesContent":["/**\n * Profile interface and property mapping for Databricks configuration.\n *\n * @module\n */\n\nimport {Secret} from './secret';\n\n/**\n * Holds configuration values resolved from a databrickscfg file and/or\n * environment variables. All fields are optional; an absent field means the\n * value was not configured.\n */\nexport interface Profile {\n /** Profile name (INI section name). */\n name?: string;\n\n /** Databricks workspace or Accounts API endpoint URL. */\n host?: string;\n\n /**\n * Databricks Workspace ID, used with unified hosts. Accepts either a classic\n * numeric workspace ID or another workspace identifier format that the server\n * understands.\n */\n workspaceId?: string;\n\n /** Databricks Account ID for Accounts API. */\n accountId?: string;\n\n /** Personal access token for PAT authentication. */\n token?: Secret;\n\n /** Selects a specific auth method when multiple credentials are available. */\n authType?: string;\n\n /** OAuth client ID for M2M authentication. */\n clientId?: string;\n\n /** OAuth client secret for M2M authentication. */\n clientSecret?: Secret;\n\n /** Path to the Databricks CLI binary (>= 0.100.0) for CLI-based auth. */\n databricksCliPath?: string;\n\n /**\n * INI keys not mapped to a known field. Only populated when loading from a\n * config file; environment variables do not contribute to extra.\n */\n extra?: Record<string, string>;\n}\n\n/**\n * Configures how a profile is resolved by {@link resolve}.\n *\n * Resolution is enabled by default: with no options, {@link resolve} reads the\n * config file and overlays DATABRICKS_* environment variables on top. Each\n * source can be disabled independently with {@link ProfileOptions.noProfile}\n * and {@link ProfileOptions.disableEnv}.\n */\nexport interface ProfileOptions {\n /**\n * Profile name (INI section) to load. If not set, resolves from the\n * DATABRICKS_CONFIG_PROFILE environment variable, then the default_profile\n * key in the __settings__ section, then falls back to the DEFAULT section.\n */\n profile?: string;\n\n /**\n * Path to the databrickscfg file. If not set, reads DATABRICKS_CONFIG_FILE\n * from the environment, falling back to ~/.databrickscfg.\n */\n configFile?: string;\n\n /**\n * Disable reading the config file. Cannot be combined with\n * {@link ProfileOptions.profile} or {@link ProfileOptions.configFile},\n * which would have nothing to read.\n */\n noProfile?: boolean;\n\n /**\n * Disable overlaying DATABRICKS_* environment variables.\n */\n disableEnv?: boolean;\n}\n\n/**\n * Reserved INI section name for SDK settings. It is never treated as a\n * profile.\n */\nexport const SETTINGS_SECTION = '__settings__';\n\n// ---------------------------------------------------------------------------\n// Declarative property mapping\n// ---------------------------------------------------------------------------\n\n/**\n * Maps a {@link Profile} field to its environment variable and INI key,\n * with typed getter and setter closures. This avoids reflection while\n * keeping the mapping declarative, matching the Go SDK's approach.\n */\nexport interface PropertyDef {\n /** The Profile field name this property maps to. */\n readonly field: keyof Profile;\n readonly envVar: string;\n readonly iniKey: string;\n /** Sets the profile field from a raw INI/env string value. */\n readonly set: (profile: Profile, raw: string) => void;\n /** Returns the profile field as a string, or undefined if unset. */\n readonly get: (profile: Profile) => string | undefined;\n}\n\n/**\n * Declarative property mapping table for all known profile fields.\n */\nexport const PROPERTY_DEFS: readonly PropertyDef[] = [\n {\n field: 'host',\n envVar: 'DATABRICKS_HOST',\n iniKey: 'host',\n set: (p: Profile, v: string): void => {\n p.host = v;\n },\n get: (p: Profile): string | undefined => p.host,\n },\n {\n field: 'workspaceId',\n envVar: 'DATABRICKS_WORKSPACE_ID',\n iniKey: 'workspace_id',\n set: (p: Profile, v: string): void => {\n p.workspaceId = v;\n },\n get: (p: Profile): string | undefined => p.workspaceId,\n },\n {\n field: 'accountId',\n envVar: 'DATABRICKS_ACCOUNT_ID',\n iniKey: 'account_id',\n set: (p: Profile, v: string): void => {\n p.accountId = v;\n },\n get: (p: Profile): string | undefined => p.accountId,\n },\n {\n field: 'token',\n envVar: 'DATABRICKS_TOKEN',\n iniKey: 'token',\n set: (p: Profile, v: string): void => {\n p.token = new Secret(v);\n },\n get: (p: Profile): string | undefined => p.token?.value,\n },\n {\n field: 'authType',\n envVar: 'DATABRICKS_AUTH_TYPE',\n iniKey: 'auth_type',\n set: (p: Profile, v: string): void => {\n p.authType = v;\n },\n get: (p: Profile): string | undefined => p.authType,\n },\n {\n field: 'clientId',\n envVar: 'DATABRICKS_CLIENT_ID',\n iniKey: 'client_id',\n set: (p: Profile, v: string): void => {\n p.clientId = v;\n },\n get: (p: Profile): string | undefined => p.clientId,\n },\n {\n field: 'clientSecret',\n envVar: 'DATABRICKS_CLIENT_SECRET',\n iniKey: 'client_secret',\n set: (p: Profile, v: string): void => {\n p.clientSecret = new Secret(v);\n },\n get: (p: Profile): string | undefined => p.clientSecret?.value,\n },\n {\n field: 'databricksCliPath',\n envVar: 'DATABRICKS_CLI_PATH',\n iniKey: 'databricks_cli_path',\n set: (p: Profile, v: string): void => {\n p.databricksCliPath = v;\n },\n get: (p: Profile): string | undefined => p.databricksCliPath,\n },\n];\n"],"mappings":";;;;;;;;;;;;AA2FA,MAAa,mBAAmB;;;;AAyBhC,MAAa,gBAAwC;CACnD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,OAAO;;EAEX,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,cAAc;;EAElB,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,YAAY;;EAEhB,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,QAAQ,IAAI,OAAO,EAAE;;EAEzB,MAAM,MAAmC,EAAE,OAAO;EACnD;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,WAAW;;EAEf,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,WAAW;;EAEf,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,eAAe,IAAI,OAAO,EAAE;;EAEhC,MAAM,MAAmC,EAAE,cAAc;EAC1D;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,oBAAoB;;EAExB,MAAM,MAAmC,EAAE;EAC5C;CACF"}
1
+ {"version":3,"file":"profile.js","names":[],"sources":["../../src/profiles/profile.ts"],"sourcesContent":["/**\n * Profile interface and property mapping for Databricks configuration.\n *\n * @module\n */\n\nimport {Secret} from './secret';\n\n/**\n * Holds configuration values resolved from a databrickscfg file and/or\n * environment variables. All fields are optional; an absent field means the\n * value was not configured.\n */\nexport interface Profile {\n /** Profile name (INI section name). */\n name?: string;\n\n /** Databricks workspace or Accounts API endpoint URL. */\n host?: string;\n\n /**\n * Databricks Workspace ID, used with unified hosts. Accepts either a classic\n * numeric workspace ID or another workspace identifier format that the server\n * understands.\n */\n workspaceId?: string;\n\n /** Databricks Account ID for Accounts API. */\n accountId?: string;\n\n /** ID of the group whose role is assumed when obtaining OAuth tokens. */\n groupId?: string;\n\n /** Personal access token for PAT authentication. */\n token?: Secret;\n\n /** Selects a specific auth method when multiple credentials are available. */\n authType?: string;\n\n /** OAuth client ID for M2M authentication. */\n clientId?: string;\n\n /** OAuth client secret for M2M authentication. */\n clientSecret?: Secret;\n\n /** Path to the Databricks CLI binary (>= 0.100.0) for CLI-based auth. */\n databricksCliPath?: string;\n\n /**\n * INI keys not mapped to a known field. Only populated when loading from a\n * config file; environment variables do not contribute to extra.\n */\n extra?: Record<string, string>;\n}\n\n/**\n * Configures how a profile is resolved by {@link resolve}.\n *\n * Resolution is enabled by default: with no options, {@link resolve} reads the\n * config file and overlays DATABRICKS_* environment variables on top. Each\n * source can be disabled independently with {@link ProfileOptions.noProfile}\n * and {@link ProfileOptions.disableEnv}.\n */\nexport interface ProfileOptions {\n /**\n * Profile name (INI section) to load. If not set, resolves from the\n * DATABRICKS_CONFIG_PROFILE environment variable, then the default_profile\n * key in the __settings__ section, then falls back to the DEFAULT section.\n */\n profile?: string;\n\n /**\n * Path to the databrickscfg file. If not set, reads DATABRICKS_CONFIG_FILE\n * from the environment, falling back to ~/.databrickscfg.\n */\n configFile?: string;\n\n /**\n * Disable reading the config file. Cannot be combined with\n * {@link ProfileOptions.profile} or {@link ProfileOptions.configFile},\n * which would have nothing to read.\n */\n noProfile?: boolean;\n\n /**\n * Disable overlaying DATABRICKS_* environment variables.\n */\n disableEnv?: boolean;\n}\n\n/**\n * Reserved INI section name for SDK settings. It is never treated as a\n * profile.\n */\nexport const SETTINGS_SECTION = '__settings__';\n\n// ---------------------------------------------------------------------------\n// Declarative property mapping\n// ---------------------------------------------------------------------------\n\n/**\n * Maps a {@link Profile} field to its environment variable and INI key,\n * with typed getter and setter closures. This avoids reflection while\n * keeping the mapping declarative, matching the Go SDK's approach.\n */\nexport interface PropertyDef {\n /** The Profile field name this property maps to. */\n readonly field: keyof Profile;\n readonly envVar: string;\n readonly iniKey: string;\n /** Sets the profile field from a raw INI/env string value. */\n readonly set: (profile: Profile, raw: string) => void;\n /** Returns the profile field as a string, or undefined if unset. */\n readonly get: (profile: Profile) => string | undefined;\n}\n\n/**\n * Declarative property mapping table for all known profile fields.\n */\nexport const PROPERTY_DEFS: readonly PropertyDef[] = [\n {\n field: 'host',\n envVar: 'DATABRICKS_HOST',\n iniKey: 'host',\n set: (p: Profile, v: string): void => {\n p.host = v;\n },\n get: (p: Profile): string | undefined => p.host,\n },\n {\n field: 'workspaceId',\n envVar: 'DATABRICKS_WORKSPACE_ID',\n iniKey: 'workspace_id',\n set: (p: Profile, v: string): void => {\n p.workspaceId = v;\n },\n get: (p: Profile): string | undefined => p.workspaceId,\n },\n {\n field: 'accountId',\n envVar: 'DATABRICKS_ACCOUNT_ID',\n iniKey: 'account_id',\n set: (p: Profile, v: string): void => {\n p.accountId = v;\n },\n get: (p: Profile): string | undefined => p.accountId,\n },\n {\n field: 'groupId',\n envVar: 'DATABRICKS_GROUP_ID',\n iniKey: 'group_id',\n set: (p: Profile, v: string): void => {\n p.groupId = v;\n },\n get: (p: Profile): string | undefined => p.groupId,\n },\n {\n field: 'token',\n envVar: 'DATABRICKS_TOKEN',\n iniKey: 'token',\n set: (p: Profile, v: string): void => {\n p.token = new Secret(v);\n },\n get: (p: Profile): string | undefined => p.token?.value,\n },\n {\n field: 'authType',\n envVar: 'DATABRICKS_AUTH_TYPE',\n iniKey: 'auth_type',\n set: (p: Profile, v: string): void => {\n p.authType = v;\n },\n get: (p: Profile): string | undefined => p.authType,\n },\n {\n field: 'clientId',\n envVar: 'DATABRICKS_CLIENT_ID',\n iniKey: 'client_id',\n set: (p: Profile, v: string): void => {\n p.clientId = v;\n },\n get: (p: Profile): string | undefined => p.clientId,\n },\n {\n field: 'clientSecret',\n envVar: 'DATABRICKS_CLIENT_SECRET',\n iniKey: 'client_secret',\n set: (p: Profile, v: string): void => {\n p.clientSecret = new Secret(v);\n },\n get: (p: Profile): string | undefined => p.clientSecret?.value,\n },\n {\n field: 'databricksCliPath',\n envVar: 'DATABRICKS_CLI_PATH',\n iniKey: 'databricks_cli_path',\n set: (p: Profile, v: string): void => {\n p.databricksCliPath = v;\n },\n get: (p: Profile): string | undefined => p.databricksCliPath,\n },\n];\n"],"mappings":";;;;;;;;;;;;AA8FA,MAAa,mBAAmB;;;;AAyBhC,MAAa,gBAAwC;CACnD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,OAAO;;EAEX,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,cAAc;;EAElB,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,YAAY;;EAEhB,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,UAAU;;EAEd,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,QAAQ,IAAI,OAAO,EAAE;;EAEzB,MAAM,MAAmC,EAAE,OAAO;EACnD;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,WAAW;;EAEf,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,WAAW;;EAEf,MAAM,MAAmC,EAAE;EAC5C;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,eAAe,IAAI,OAAO,EAAE;;EAEhC,MAAM,MAAmC,EAAE,cAAc;EAC1D;CACD;EACE,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,MAAM,GAAY,MAAoB;AACpC,KAAE,oBAAoB;;EAExB,MAAM,MAAmC,EAAE;EAC5C;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sdk-core",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
4
4
  "description": "Databricks core library for JavaScript/TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",