@narrative.io/data-collaboration-sdk-ts 3.8.0 → 4.0.0-beta.1

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.
Files changed (79) hide show
  1. package/build/access-rules/index.d.ts +3 -3
  2. package/build/access-rules/index.js +1 -1
  3. package/build/access-rules/types.d.ts +17 -3
  4. package/build/access-tokens/index.d.ts +4 -4
  5. package/build/access-tokens/index.js +3 -2
  6. package/build/access-tokens/types.d.ts +5 -3
  7. package/build/agents/types.d.ts +22 -6
  8. package/build/apps/index.d.ts +19 -6
  9. package/build/apps/index.js +26 -10
  10. package/build/apps/types.d.ts +1 -1
  11. package/build/attributes/index.d.ts +15 -12
  12. package/build/attributes/index.js +16 -7
  13. package/build/attributes/types.d.ts +18 -2
  14. package/build/authentication/types.d.ts +3 -3
  15. package/build/companies/index.d.ts +7 -4
  16. package/build/companies/index.js +10 -5
  17. package/build/company-info/types.d.ts +10 -0
  18. package/build/compute-pools/types.d.ts +16 -1
  19. package/build/connections/index.d.ts +29 -25
  20. package/build/connections/index.js +48 -29
  21. package/build/connections/types.d.ts +69 -16
  22. package/build/contracts/index.d.ts +10 -19
  23. package/build/contracts/index.js +8 -22
  24. package/build/contracts/types.d.ts +6 -2
  25. package/build/data-planes/index.d.ts +5 -1
  26. package/build/data-planes/index.js +7 -1
  27. package/build/data-planes/types.d.ts +95 -15
  28. package/build/data-streams/types.d.ts +13 -11
  29. package/build/datasets/index.d.ts +15 -4
  30. package/build/datasets/index.js +5 -3
  31. package/build/datasets/types.d.ts +17 -11
  32. package/build/encryption-materials/index.d.ts +5 -3
  33. package/build/encryption-materials/index.js +3 -1
  34. package/build/encryption-materials/types.d.ts +17 -5
  35. package/build/forecast/types.d.ts +42 -18
  36. package/build/health/index.d.ts +5 -0
  37. package/build/health/index.js +5 -0
  38. package/build/health/types.d.ts +8 -2
  39. package/build/installations/index.d.ts +6 -0
  40. package/build/installations/index.js +2 -1
  41. package/build/installations/types.d.ts +7 -1
  42. package/build/jobs/index.d.ts +7 -3
  43. package/build/jobs/index.js +5 -3
  44. package/build/jobs/types.d.ts +14 -14
  45. package/build/mappings/index.d.ts +15 -5
  46. package/build/mappings/index.js +9 -4
  47. package/build/mappings/types.d.ts +5 -3
  48. package/build/model-inference/index.d.ts +2 -2
  49. package/build/model-inference/types.d.ts +23 -4
  50. package/build/model-training/types.d.ts +16 -1
  51. package/build/models/index.d.ts +13 -12
  52. package/build/models/index.js +29 -8
  53. package/build/models/types.d.ts +96 -10
  54. package/build/nql/types.d.ts +17 -7
  55. package/build/nql/types.js +5 -1
  56. package/build/ping/index.d.ts +5 -1
  57. package/build/ping/index.js +5 -1
  58. package/build/products/index.d.ts +4 -3
  59. package/build/products/index.js +2 -2
  60. package/build/products/types.d.ts +26 -23
  61. package/build/queries/index.d.ts +7 -6
  62. package/build/queries/index.js +34 -4
  63. package/build/queries/types.d.ts +15 -0
  64. package/build/resources/index.d.ts +2 -2
  65. package/build/resources/index.js +1 -1
  66. package/build/resources/types.d.ts +16 -8
  67. package/build/rosetta-stone/index.d.ts +8 -8
  68. package/build/rosetta-stone/index.js +16 -32
  69. package/build/subscriptions/types.d.ts +3 -3
  70. package/build/uploads/index.d.ts +4 -1
  71. package/build/uploads/index.js +5 -2
  72. package/build/views/index.d.ts +11 -10
  73. package/build/views/index.js +40 -7
  74. package/build/views/types.d.ts +25 -4
  75. package/build/whoami/types.d.ts +38 -9
  76. package/build/workflows/index.d.ts +6 -7
  77. package/build/workflows/index.js +9 -4
  78. package/build/workflows/types.d.ts +23 -4
  79. package/package.json +3 -3
@@ -9,11 +9,15 @@ class WorkflowsApi extends BaseApi {
9
9
  /**
10
10
  * List all active workflows for the authenticated company.
11
11
  *
12
- * @param {PaginationOptions} [params] - Optional pagination parameters.
12
+ * @param {ListWorkflowsParams} [params] - Optional pagination parameters, plus
13
+ * `data_plane_id` to return only the workflows on that data plane.
13
14
  * @returns {Promise<ListWorkflowsResponse>} A promise that resolves to a paginated list of workflows.
14
15
  */
15
16
  async listWorkflows(params) {
16
- return await this.get(resourceName, params);
17
+ // Spread so the argument is an anonymous object type rather than an
18
+ // interface: only the former satisfies `get`'s index-signature constraint.
19
+ // See {@link ListRunsParams} on why these params carry no index signature.
20
+ return await this.get(resourceName, params && { ...params });
17
21
  }
18
22
  /**
19
23
  * Create a new workflow from a YAML specification.
@@ -68,11 +72,12 @@ class WorkflowsApi extends BaseApi {
68
72
  * List execution runs for a workflow. Results are ordered by start time descending.
69
73
  *
70
74
  * @param {string} workflowId - The unique identifier for the workflow.
71
- * @param {ListRunsParams} [params] - Optional pagination parameters (pageSize, pageToken).
75
+ * @param {ListRunsParams} [params] - Optional pagination parameters (per_page, page_token).
72
76
  * @returns {Promise<ListRunsResponse>} A promise that resolves to a paginated list of workflow runs.
73
77
  */
74
78
  async listWorkflowRuns(workflowId, params) {
75
- return await this.get(`${resourceName}/${workflowId}/runs`, params);
79
+ // See the spread in `listWorkflows`.
80
+ return await this.get(`${resourceName}/${workflowId}/runs`, params && { ...params });
76
81
  }
77
82
  }
78
83
  export { WorkflowsApi, };
@@ -1,3 +1,4 @@
1
+ import type { PaginationOptions } from "../types";
1
2
  export type WorkflowStatus = "active" | "archived";
2
3
  export type WorkflowRunStatus = "running" | "completed" | "failed" | "canceled" | "terminated" | "unknown";
3
4
  export interface WorkflowResponse {
@@ -10,13 +11,17 @@ export interface WorkflowResponse {
10
11
  created_by: number;
11
12
  updated_at: string;
12
13
  status: WorkflowStatus;
13
- archived_at?: string | null;
14
+ archived_at: string | null;
15
+ /** Tags that describe the workflow. */
16
+ tags: string[];
14
17
  }
15
18
  export interface CreateWorkflowRequest {
16
19
  specification: string;
17
20
  data_plane_id: string;
18
21
  trigger_immediately?: boolean | null;
19
22
  schedule_immediately?: boolean | null;
23
+ /** Tags that describe the workflow. Defaults to an empty list. */
24
+ tags?: string[];
20
25
  }
21
26
  export interface CreateWorkflowResponse extends WorkflowResponse {
22
27
  run_id?: string | null;
@@ -48,7 +53,21 @@ export interface ListRunsResponse {
48
53
  runs: WorkflowRun[];
49
54
  next_page_token?: string | null;
50
55
  }
51
- export interface ListRunsParams extends Record<string, unknown> {
52
- pageSize?: number;
53
- pageToken?: string;
56
+ /**
57
+ * Query parameters for `GET /workflows/{id}/runs`.
58
+ *
59
+ * Deliberately has no index signature: an index signature would silently accept
60
+ * misspelled or legacy parameter names (e.g. `pageSize`/`pageToken`), which the
61
+ * server ignores — the request succeeds and pagination just never advances.
62
+ */
63
+ export interface ListRunsParams {
64
+ /** Maximum number of runs to return per page (`per_page` query param). Defaults to 10. */
65
+ per_page?: number;
66
+ /** Opaque token from a previous response (`page_token` query param). */
67
+ page_token?: string;
68
+ }
69
+ /** Query parameters for `GET /workflows`. See {@link ListRunsParams} on why there's no index signature. */
70
+ export interface ListWorkflowsParams extends PaginationOptions {
71
+ /** Narrow results to workflows on this data plane. */
72
+ data_plane_id?: string;
54
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "3.8.0",
3
+ "version": "4.0.0-beta.1",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",
@@ -30,7 +30,7 @@
30
30
  "@babel/core": "8.0.1",
31
31
  "@babel/preset-env": "8.0.2",
32
32
  "@babel/preset-typescript": "8.0.1",
33
- "@biomejs/biome": "2.5.4",
33
+ "@biomejs/biome": "2.5.5",
34
34
  "@commitlint/cli": "21.2.1",
35
35
  "@commitlint/config-conventional": "21.2.0",
36
36
  "@types/jest": "30.0.0",
@@ -38,7 +38,7 @@
38
38
  "babel-jest": "30.4.1",
39
39
  "jest": "30.4.2",
40
40
  "lefthook": "2.1.10",
41
- "ts-jest": "29.4.11",
41
+ "ts-jest": "29.4.12",
42
42
  "typescript": "6.0.0-dev.20260416"
43
43
  },
44
44
  "dependencies": {