dataiku-sdk 0.1.1 → 0.2.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/bin/dss.js CHANGED
@@ -1,2 +1,4 @@
1
1
  #!/usr/bin/env bun
2
- import "../dist/src/cli.js";
2
+ import * as cli from "../dist/src/cli.js";
3
+
4
+ void cli;
@@ -298,8 +298,8 @@ export declare const JupyterNotebookSummarySchema: import("@sinclair/typebox").T
298
298
  language: import("@sinclair/typebox").TString;
299
299
  kernelSpec: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
300
300
  name: import("@sinclair/typebox").TString;
301
- display_name: import("@sinclair/typebox").TString;
302
- language: import("@sinclair/typebox").TString;
301
+ display_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
302
+ language: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
303
303
  }>>;
304
304
  }>;
305
305
  export type JupyterNotebookSummary = Static<typeof JupyterNotebookSummarySchema>;
@@ -438,8 +438,8 @@ export declare const JupyterNotebookSummaryArraySchema: import("@sinclair/typebo
438
438
  language: import("@sinclair/typebox").TString;
439
439
  kernelSpec: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
440
440
  name: import("@sinclair/typebox").TString;
441
- display_name: import("@sinclair/typebox").TString;
442
- language: import("@sinclair/typebox").TString;
441
+ display_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
442
+ language: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
443
443
  }>>;
444
444
  }>>;
445
445
  export declare const SqlNotebookSummaryArraySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
@@ -306,8 +306,8 @@ export const JupyterNotebookSummarySchema = Type.Object({
306
306
  language: Type.String(),
307
307
  kernelSpec: Type.Optional(Type.Object({
308
308
  name: Type.String(),
309
- display_name: Type.String(),
310
- language: Type.String(),
309
+ display_name: Type.Optional(Type.String()),
310
+ language: Type.Optional(Type.String()),
311
311
  }, { additionalProperties: true, })),
312
312
  }, { additionalProperties: true, });
313
313
  export const JupyterNotebookContentSchema = Type.Object({
@@ -0,0 +1,4 @@
1
+ export declare function validateCredentials(url: string, apiKey: string): Promise<{
2
+ valid: boolean;
3
+ error?: string;
4
+ }>;
@@ -0,0 +1,20 @@
1
+ import { DataikuClient, } from "./client.js";
2
+ import { DataikuError, } from "./errors.js";
3
+ export async function validateCredentials(url, apiKey) {
4
+ try {
5
+ const client = new DataikuClient({
6
+ url,
7
+ apiKey,
8
+ requestTimeoutMs: 10_000,
9
+ retryMaxAttempts: 1,
10
+ });
11
+ await client.projects.list();
12
+ return { valid: true, };
13
+ }
14
+ catch (err) {
15
+ if (err instanceof DataikuError) {
16
+ return { valid: false, error: err.message, };
17
+ }
18
+ return { valid: false, error: err instanceof Error ? err.message : String(err), };
19
+ }
20
+ }