@narrative.io/data-collaboration-sdk-ts 4.3.1 → 4.5.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.
Files changed (39) hide show
  1. package/build/base-api.d.ts +11 -0
  2. package/build/base-api.js +15 -0
  3. package/build/data-planes/types.d.ts +52 -115
  4. package/build/derivations/index.d.ts +84 -0
  5. package/build/derivations/index.js +93 -0
  6. package/build/derivations/types.d.ts +56 -0
  7. package/build/derivations/types.js +1 -0
  8. package/build/generated/api-types.d.ts +7112 -5185
  9. package/build/generated/api-types.js +1 -1
  10. package/build/http-client.d.ts +1 -0
  11. package/build/http-client.js +3 -0
  12. package/build/index.d.ts +4 -1
  13. package/build/index.js +4 -0
  14. package/build/jobs/types.d.ts +137 -337
  15. package/build/jobs/types.js +3 -3
  16. package/build/model-training/index.d.ts +21 -5
  17. package/build/model-training/index.js +20 -4
  18. package/build/model-training/types.d.ts +69 -6
  19. package/build/nql/index.d.ts +28 -2
  20. package/build/nql/index.js +28 -0
  21. package/build/nql/types.d.ts +16 -4
  22. package/build/rosetta/types.d.ts +1 -1
  23. package/build/testing/fixtures/data-planes.d.ts +22 -3
  24. package/build/testing/fixtures/data-planes.js +52 -7
  25. package/build/testing/fixtures/derivations.d.ts +18 -0
  26. package/build/testing/fixtures/derivations.js +43 -0
  27. package/build/testing/fixtures/index.d.ts +5 -1
  28. package/build/testing/fixtures/index.js +5 -1
  29. package/build/testing/fixtures/jobs.d.ts +75 -0
  30. package/build/testing/fixtures/jobs.js +433 -0
  31. package/build/testing/fixtures/model-training.d.ts +8 -0
  32. package/build/testing/fixtures/model-training.js +12 -0
  33. package/build/testing/fixtures/nql.d.ts +10 -0
  34. package/build/testing/fixtures/nql.js +37 -0
  35. package/build/testing/handlers/data-planes.js +5 -3
  36. package/build/testing/index.d.ts +24 -4
  37. package/build/testing/index.js +23 -3
  38. package/build/testing/types.d.ts +70 -1
  39. package/package.json +3 -2
@@ -1,10 +1,79 @@
1
1
  import type { components } from "../generated/api-types";
2
2
  /** A data plane as the API returns it, owned or shared. */
3
3
  export type DataPlaneResponse = components["schemas"]["DataPlaneResponse"];
4
- /** A data plane this company owns. Only owned planes have a default compute pool. */
4
+ /**
5
+ * A data plane this company owns. Only owned planes carry an external id and
6
+ * collaborators, and only they accept the default-compute-pool endpoints.
7
+ */
5
8
  export type DataPlaneOwnedResponse = components["schemas"]["DataPlaneOwnedResponse"];
9
+ /**
10
+ * A data plane shared with this company. Same shape as the owned variant minus
11
+ * `external_id` and `collaborators`, and its platform is one of the
12
+ * `platform_shared_*` types rather than the owned ones.
13
+ */
14
+ export type DataPlaneSharedResponse = components["schemas"]["DataPlaneSharedResponse"];
15
+ /**
16
+ * The platform an owned data plane runs on — AWS or Snowflake.
17
+ *
18
+ * Both factories default to AWS, so a test that needs another variant passes
19
+ * this as a `platform` override. Named after the root entry point's
20
+ * `DataPlanePlatform` rather than the generated schema's bare `Platform`, so
21
+ * the two entry points read the same way — the two are assignable in both
22
+ * directions.
23
+ */
24
+ export type DataPlanePlatform = components["schemas"]["Platform"];
25
+ /**
26
+ * The platform a shared data plane runs on. Distinct from
27
+ * {@link DataPlanePlatform}: the discriminators are the `platform_shared_*`
28
+ * ones, and `region` is required on the AWS variant but optional and nullable
29
+ * on the Snowflake one.
30
+ */
31
+ export type DataPlaneSharedPlatform = components["schemas"]["PlatformSharedResponse"];
6
32
  /** A job as the API returns it, including the one a health check enqueues. */
7
33
  export type JobResponse = components["schemas"]["JobResponse"];
34
+ /**
35
+ * The fields every job carries, whatever its type. Exported so a test can build
36
+ * a job type the fixtures do not cover without restating the envelope.
37
+ */
38
+ export type JobEnvelope = components["schemas"]["JobBase"];
39
+ export type MaterializeViewJobResponse = components["schemas"]["MaterializeViewJobResponse"];
40
+ export type NqlForecastJobResponse = components["schemas"]["NqlForecastJobResponse"];
41
+ export type DatasetsSampleJobResponse = components["schemas"]["DatasetsSampleJobResponse"];
42
+ export type DatasetsCalculateColumnStatsJobResponse = components["schemas"]["DatasetsCalculateColumnStatsJobResponse"];
43
+ export type CollectAccessRulesBillingDataJobResponse = components["schemas"]["CollectAccessRulesBillingDataJobResponse"];
44
+ export type DatasetsDeliverDataJobResponse = components["schemas"]["DatasetsDeliverDataJobResponse"];
45
+ export type ModelInferenceRunJobResponse = components["schemas"]["ModelInferenceRunJobResponse"];
46
+ export type DatasetsDeleteTableJobResponse = components["schemas"]["DatasetsDeleteTableJobResponse"];
47
+ export type DatasetsExecuteDmlJobResponse = components["schemas"]["DatasetsExecuteDmlJobResponse"];
48
+ export type DatasetsCreateTableJobResponse = components["schemas"]["DatasetsCreateTableJobResponse"];
49
+ export type DatasetsTruncateTableJobResponse = components["schemas"]["DatasetsTruncateTableJobResponse"];
50
+ export type DatasetsEnforceTableTtlRetentionPolicyJobResponse = components["schemas"]["DatasetsEnforceTableTtlRetentionPolicyJobResponse"];
51
+ export type DatasetsEnforceRowTtlRetentionPolicyJobResponse = components["schemas"]["DatasetsEnforceRowTtlRetentionPolicyJobResponse"];
52
+ export type DatasetsCalculateAffectedRowsJobResponse = components["schemas"]["DatasetsCalculateAffectedRowsJobResponse"];
53
+ export type ModelTrainingRunJobResponse = components["schemas"]["ModelTrainingRunJobResponse"];
54
+ export type ModelsDeliverModelJobResponse = components["schemas"]["ModelsDeliverModelJobResponse"];
55
+ export type ModelsTrainClassifierJobResponse = components["schemas"]["ModelsTrainClassifierJobResponse"];
56
+ export type HealthCheckJobResponse = components["schemas"]["HealthCheckJobResponse"];
57
+ /**
58
+ * A job whose type the spec does not describe a branch for. Job types are free
59
+ * strings on the server, so this is what a type added after the spec was
60
+ * generated decodes as, with `input` and `result` left free-form.
61
+ */
62
+ export type OtherJobResponse = components["schemas"]["OtherJobResponse"];
63
+ /**
64
+ * A derivation rule as the API returns it. `warnings` is populated on create
65
+ * and update responses and empty on reads.
66
+ */
67
+ export type DerivationResponse = components["schemas"]["DerivationResponse"];
68
+ /**
69
+ * What `POST /v1/nql/execute` returns — the workflow the statement compiled to,
70
+ * plus the id of its run. Named after the root entry point's
71
+ * `NqlExecuteResponse` rather than the generated schema's
72
+ * `CreateWorkflowResponseWithRunId`, so the two entry points read the same way.
73
+ */
74
+ export type NqlExecuteResponse = components["schemas"]["CreateWorkflowResponseWithRunId"];
75
+ /** What `POST /v1/model-training/train-classifier` returns. */
76
+ export type TrainClassifierResponse = components["schemas"]["TrainClassifierResponse"];
8
77
  export interface AuthGuardContext {
9
78
  request: Request;
10
79
  /** Cookies msw parsed off the request. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "4.3.1",
3
+ "version": "4.5.0",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",
@@ -29,6 +29,7 @@
29
29
  "./build/data-planes": "./build/data-planes/index.js",
30
30
  "./build/data-streams": "./build/data-streams/index.js",
31
31
  "./build/datasets": "./build/datasets/index.js",
32
+ "./build/derivations": "./build/derivations/index.js",
32
33
  "./build/encryption-materials": "./build/encryption-materials/index.js",
33
34
  "./build/forecast": "./build/forecast/index.js",
34
35
  "./build/health": "./build/health/index.js",
@@ -60,7 +61,7 @@
60
61
  "./package.json": "./package.json"
61
62
  },
62
63
  "description": "",
63
- "packageManager": "bun@1.2.21",
64
+ "packageManager": "bun@1.3.14",
64
65
  "scripts": {
65
66
  "build": "tsc",
66
67
  "lint": "bunx @biomejs/biome check --write ./src",