@narrative.io/data-collaboration-sdk-ts 2.41.0 → 2.43.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.
@@ -20,5 +20,12 @@ declare class ModelsApi extends BaseApi {
20
20
  * @returns {Promise<Model>} A promise that resolves with the updated model.
21
21
  */
22
22
  updateModel(modelId: string, data: UpdateModelRequest): Promise<Model>;
23
+ /**
24
+ * Deletes a model from the API.
25
+ *
26
+ * @param {string} modelId - The ID of the model to delete.
27
+ * @returns {Promise<void>} A promise that resolves when the model is deleted.
28
+ */
29
+ deleteModel(modelId: string): Promise<void>;
23
30
  }
24
31
  export { ModelsApi, type ModelCollaborators, type Model, type CreateModelRequest, type UpdateModelRequest, };
@@ -29,5 +29,14 @@ class ModelsApi extends BaseApi {
29
29
  async updateModel(modelId, data) {
30
30
  return await this.put(`${resourceName}/${modelId}`, data);
31
31
  }
32
+ /**
33
+ * Deletes a model from the API.
34
+ *
35
+ * @param {string} modelId - The ID of the model to delete.
36
+ * @returns {Promise<void>} A promise that resolves when the model is deleted.
37
+ */
38
+ async deleteModel(modelId) {
39
+ return await this.delete(`${resourceName}/${modelId}`);
40
+ }
32
41
  }
33
42
  export { ModelsApi, };
@@ -48,7 +48,10 @@ export interface Deduplication {
48
48
  }
49
49
  export type ColumnRef = AttributeRef | DatasetColumnRef | RawRef;
50
50
  export type BooleanExpression = And | Between | Equals | NotEquals | Gt | Gte | In | IsNull | Like | Lt | Lte | Not | Or;
51
- export type Table = RosettaTable | DatasetTable | RawTable | ast.NqlPlaceholder<ast.NqlAstType>;
51
+ export interface PlaceholderTable extends ast.NqlPlaceholder<ast.NqlAstType> {
52
+ join?: Join;
53
+ }
54
+ export type Table = RosettaTable | DatasetTable | RawTable | PlaceholderTable;
52
55
  export interface RosettaTable {
53
56
  type: "rosetta_stone";
54
57
  as?: string;
@@ -431,10 +431,7 @@ function parseJoin(n) {
431
431
  conditionType: n.condition_type,
432
432
  joinType: n.join_type,
433
433
  };
434
- // ??? I'm not sure about this logic ??? - nj
435
- if (right[0].type !== "placeholder") {
436
- right[0].join = join;
437
- }
434
+ right[0].join = join;
438
435
  return left.concat(right);
439
436
  }
440
437
  function parseTable(n) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "2.41.0",
3
+ "version": "2.43.0",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",