@malloy-publisher/sdk 0.0.87 → 0.0.88

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.
@@ -476,6 +476,12 @@ export interface Package {
476
476
  * @memberof Package
477
477
  */
478
478
  'description'?: string;
479
+ /**
480
+ * Package location, it can be an absolute path or an URI (e.g. github, s3, gcs, etc.).
481
+ * @type {string}
482
+ * @memberof Package
483
+ */
484
+ 'location'?: string;
479
485
  }
480
486
  /**
481
487
  *
@@ -544,6 +550,12 @@ export interface Project {
544
550
  * @memberof Project
545
551
  */
546
552
  'readme'?: string;
553
+ /**
554
+ * Project location, it can be an absolute path or an URI (e.g. github, s3, gcs, etc.).
555
+ * @type {string}
556
+ * @memberof Project
557
+ */
558
+ 'location'?: string;
547
559
  }
548
560
  /**
549
561
  * Named model query.
@@ -744,6 +756,19 @@ export interface SqlSource {
744
756
  */
745
757
  'source'?: string;
746
758
  }
759
+ /**
760
+ * Request to start watching a project
761
+ * @export
762
+ * @interface StartWatchRequest
763
+ */
764
+ export interface StartWatchRequest {
765
+ /**
766
+ * Name of the project to watch
767
+ * @type {string}
768
+ * @memberof StartWatchRequest
769
+ */
770
+ 'projectName': string;
771
+ }
747
772
  /**
748
773
  *
749
774
  * @export
@@ -875,6 +900,31 @@ export interface View {
875
900
  */
876
901
  'annotations'?: Array<string>;
877
902
  }
903
+ /**
904
+ * Current watch mode status
905
+ * @export
906
+ * @interface WatchStatus
907
+ */
908
+ export interface WatchStatus {
909
+ /**
910
+ * Whether watch mode is currently enabled
911
+ * @type {boolean}
912
+ * @memberof WatchStatus
913
+ */
914
+ 'enabled'?: boolean;
915
+ /**
916
+ * Name of the project being watched
917
+ * @type {string}
918
+ * @memberof WatchStatus
919
+ */
920
+ 'projectName'?: string;
921
+ /**
922
+ * The path being watched, null if not watching
923
+ * @type {string}
924
+ * @memberof WatchStatus
925
+ */
926
+ 'watchingPath'?: string;
927
+ }
878
928
  /**
879
929
  * ConnectionsApi - axios parameter creator
880
930
  * @export
@@ -2113,3 +2163,120 @@ export declare class SchedulesApi extends BaseAPI {
2113
2163
  */
2114
2164
  listSchedules(projectName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Schedule[], any>>;
2115
2165
  }
2166
+ /**
2167
+ * WatchModeApi - axios parameter creator
2168
+ * @export
2169
+ */
2170
+ export declare const WatchModeApiAxiosParamCreator: (configuration?: Configuration) => {
2171
+ /**
2172
+ *
2173
+ * @summary Returns the current watch mode status.
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ */
2177
+ getWatchStatus: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2178
+ /**
2179
+ *
2180
+ * @summary Starts watching a project for file changes.
2181
+ * @param {StartWatchRequest} startWatchRequest
2182
+ * @param {*} [options] Override http request option.
2183
+ * @throws {RequiredError}
2184
+ */
2185
+ startWatching: (startWatchRequest: StartWatchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2186
+ /**
2187
+ *
2188
+ * @summary Stops watching for file changes.
2189
+ * @param {*} [options] Override http request option.
2190
+ * @throws {RequiredError}
2191
+ */
2192
+ stopWatching: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2193
+ };
2194
+ /**
2195
+ * WatchModeApi - functional programming interface
2196
+ * @export
2197
+ */
2198
+ export declare const WatchModeApiFp: (configuration?: Configuration) => {
2199
+ /**
2200
+ *
2201
+ * @summary Returns the current watch mode status.
2202
+ * @param {*} [options] Override http request option.
2203
+ * @throws {RequiredError}
2204
+ */
2205
+ getWatchStatus(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WatchStatus>>;
2206
+ /**
2207
+ *
2208
+ * @summary Starts watching a project for file changes.
2209
+ * @param {StartWatchRequest} startWatchRequest
2210
+ * @param {*} [options] Override http request option.
2211
+ * @throws {RequiredError}
2212
+ */
2213
+ startWatching(startWatchRequest: StartWatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2214
+ /**
2215
+ *
2216
+ * @summary Stops watching for file changes.
2217
+ * @param {*} [options] Override http request option.
2218
+ * @throws {RequiredError}
2219
+ */
2220
+ stopWatching(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
2221
+ };
2222
+ /**
2223
+ * WatchModeApi - factory interface
2224
+ * @export
2225
+ */
2226
+ export declare const WatchModeApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
2227
+ /**
2228
+ *
2229
+ * @summary Returns the current watch mode status.
2230
+ * @param {*} [options] Override http request option.
2231
+ * @throws {RequiredError}
2232
+ */
2233
+ getWatchStatus(options?: RawAxiosRequestConfig): AxiosPromise<WatchStatus>;
2234
+ /**
2235
+ *
2236
+ * @summary Starts watching a project for file changes.
2237
+ * @param {StartWatchRequest} startWatchRequest
2238
+ * @param {*} [options] Override http request option.
2239
+ * @throws {RequiredError}
2240
+ */
2241
+ startWatching(startWatchRequest: StartWatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
2242
+ /**
2243
+ *
2244
+ * @summary Stops watching for file changes.
2245
+ * @param {*} [options] Override http request option.
2246
+ * @throws {RequiredError}
2247
+ */
2248
+ stopWatching(options?: RawAxiosRequestConfig): AxiosPromise<void>;
2249
+ };
2250
+ /**
2251
+ * WatchModeApi - object-oriented interface
2252
+ * @export
2253
+ * @class WatchModeApi
2254
+ * @extends {BaseAPI}
2255
+ */
2256
+ export declare class WatchModeApi extends BaseAPI {
2257
+ /**
2258
+ *
2259
+ * @summary Returns the current watch mode status.
2260
+ * @param {*} [options] Override http request option.
2261
+ * @throws {RequiredError}
2262
+ * @memberof WatchModeApi
2263
+ */
2264
+ getWatchStatus(options?: RawAxiosRequestConfig): Promise< AxiosResponse<WatchStatus, any>>;
2265
+ /**
2266
+ *
2267
+ * @summary Starts watching a project for file changes.
2268
+ * @param {StartWatchRequest} startWatchRequest
2269
+ * @param {*} [options] Override http request option.
2270
+ * @throws {RequiredError}
2271
+ * @memberof WatchModeApi
2272
+ */
2273
+ startWatching(startWatchRequest: StartWatchRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any>>;
2274
+ /**
2275
+ *
2276
+ * @summary Stops watching for file changes.
2277
+ * @param {*} [options] Override http request option.
2278
+ * @throws {RequiredError}
2279
+ * @memberof WatchModeApi
2280
+ */
2281
+ stopWatching(options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any>>;
2282
+ }
@@ -1 +1,6 @@
1
- export declare function AnalyzePackageButton(): import("react/jsx-runtime").JSX.Element;
1
+ import { default as React } from 'react';
2
+ import { WorkbookLocator } from './Workbook/WorkbookStorage';
3
+ export interface AnalyzePackageButtonProps {
4
+ onWorkbookSelect: (workbook: WorkbookLocator, event: React.MouseEvent) => void;
5
+ }
6
+ export declare function AnalyzePackageButton({ onWorkbookSelect, }: AnalyzePackageButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,9 @@
1
- import { PackageContextProps } from '../Package';
2
1
  import { WorkbookLocator, WorkbookStorage, Workspace } from './WorkbookStorage';
3
2
  export declare class BrowserWorkbookStorage implements WorkbookStorage {
4
- private makeKey;
5
- listWorkspaces(context: PackageContextProps, writeableOnly: boolean): Promise<Workspace[]>;
6
- listWorkbooks(workspace: Workspace, context: PackageContextProps): Promise<WorkbookLocator[]>;
7
- getWorkbook(context: PackageContextProps, path: WorkbookLocator): Promise<string>;
8
- deleteWorkbook(context: PackageContextProps, path: WorkbookLocator): Promise<void>;
9
- saveWorkbook(context: PackageContextProps, path: WorkbookLocator, notebook: string): Promise<void>;
10
- moveWorkbook(context: PackageContextProps, from: WorkbookLocator, to: WorkbookLocator): Promise<void>;
3
+ listWorkspaces(writeableOnly: boolean): Promise<Workspace[]>;
4
+ listWorkbooks(_workspace: Workspace): Promise<WorkbookLocator[]>;
5
+ getWorkbook(path: WorkbookLocator): Promise<string>;
6
+ deleteWorkbook(path: WorkbookLocator): Promise<void>;
7
+ saveWorkbook(path: WorkbookLocator, notebook: string): Promise<void>;
8
+ moveWorkbook(from: WorkbookLocator, to: WorkbookLocator): Promise<void>;
11
9
  }
@@ -4,6 +4,8 @@ interface WorkbookProps {
4
4
  expandCodeCells?: boolean;
5
5
  expandEmbeddings?: boolean;
6
6
  hideEmbeddingIcons?: boolean;
7
+ defaultProjectName?: string;
8
+ defaultPackageName?: string;
7
9
  }
8
- export default function Workbook({ workbookPath, expandCodeCells, expandEmbeddings, hideEmbeddingIcons, }: WorkbookProps): import("react/jsx-runtime").JSX.Element;
10
+ export default function Workbook({ workbookPath, expandCodeCells, expandEmbeddings, hideEmbeddingIcons, defaultProjectName, defaultPackageName, }: WorkbookProps): import("react/jsx-runtime").JSX.Element;
9
11
  export {};
@@ -1,4 +1,3 @@
1
- import { PackageContextProps } from '../Package';
2
1
  import { WorkbookLocator, WorkbookStorage } from './WorkbookStorage';
3
2
  /**
4
3
  * Interface representing the data structure of a Mutable Workbook
@@ -38,14 +37,12 @@ export declare class WorkbookManager {
38
37
  private workbookData;
39
38
  private isSaved;
40
39
  private workbookStorage;
41
- private packageContext;
42
40
  /**
43
41
  * Creates a new WorkbookManager instance
44
42
  * @param {WorkbookStorage} workbookStorage - Storage implementation
45
- * @param {PackageContextProps} packageContext - Package context for storage
46
43
  * @param {WorkbookData} workbookData - Initial workbook data
47
44
  */
48
- constructor(workbookStorage: WorkbookStorage, packageContext: PackageContextProps, workbookData: WorkbookData);
45
+ constructor(workbookStorage: WorkbookStorage, workbookData: WorkbookData);
49
46
  /**
50
47
  * Gets the current workbook data
51
48
  * @returns {WorkbookData} The current workbook data
@@ -75,7 +72,7 @@ export declare class WorkbookManager {
75
72
  * @returns {string} The Malloy workbook string
76
73
  */
77
74
  toMalloyWorkbook(): string;
78
- static newWorkbook(workbookStorage: WorkbookStorage, packageContext: PackageContextProps): WorkbookManager;
75
+ static newWorkbook(workbookStorage: WorkbookStorage): WorkbookManager;
79
76
  /**
80
77
  * Creates a new workbook manager by loading from local storage.
81
78
  * Returns an empty instance if the workbook is not found.
@@ -83,5 +80,5 @@ export declare class WorkbookManager {
83
80
  * @param userContext - The user context for storage
84
81
  * @param workbookPath - The path to the workbook file (relative to project/package)
85
82
  */
86
- static loadWorkbook(workbookStorage: WorkbookStorage, packageContext: PackageContextProps, workbookPath: WorkbookLocator): Promise<WorkbookManager>;
83
+ static loadWorkbook(workbookStorage: WorkbookStorage, workbookPath: WorkbookLocator): Promise<WorkbookManager>;
87
84
  }
@@ -1,4 +1,3 @@
1
- import { PackageContextProps } from '../Package';
2
1
  export interface Workspace {
3
2
  name: string;
4
3
  writeable: boolean;
@@ -9,10 +8,10 @@ export interface WorkbookLocator {
9
8
  workspace: string;
10
9
  }
11
10
  export interface WorkbookStorage {
12
- listWorkspaces(context: PackageContextProps, writeableOnly: boolean): Promise<Workspace[]>;
13
- listWorkbooks(workspace: Workspace, context: PackageContextProps): Promise<WorkbookLocator[]>;
14
- getWorkbook(context: PackageContextProps, path: WorkbookLocator): Promise<string>;
15
- deleteWorkbook(context: PackageContextProps, path: WorkbookLocator): Promise<void>;
16
- saveWorkbook(context: PackageContextProps, path: WorkbookLocator, workbook: string): Promise<void>;
17
- moveWorkbook(context: PackageContextProps, from: WorkbookLocator, to: WorkbookLocator): Promise<void>;
11
+ listWorkspaces(writeableOnly: boolean): Promise<Workspace[]>;
12
+ listWorkbooks(workspace: Workspace): Promise<WorkbookLocator[]>;
13
+ getWorkbook(path: WorkbookLocator): Promise<string>;
14
+ deleteWorkbook(path: WorkbookLocator): Promise<void>;
15
+ saveWorkbook(path: WorkbookLocator, workbook: string): Promise<void>;
16
+ moveWorkbook(from: WorkbookLocator, to: WorkbookLocator): Promise<void>;
18
17
  }