@narrative.io/data-collaboration-sdk-ts 2.95.0-beta.0 → 2.95.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 (67) hide show
  1. package/build/access-rules/index.d.ts +1 -1
  2. package/build/access-tokens/index.d.ts +1 -1
  3. package/build/access-tokens/types.d.ts +2 -0
  4. package/build/access-tokens/types.js +2 -0
  5. package/build/apps/index.d.ts +1 -8
  6. package/build/apps/index.js +0 -9
  7. package/build/attributes/index.d.ts +1 -1
  8. package/build/authentication/index.d.ts +1 -1
  9. package/build/collaboration-policy/core/filter-builder.js +1 -7
  10. package/build/collaboration-policy/core/sql-builder.js +9 -11
  11. package/build/collaboration-policy/core/types.d.ts +10 -81
  12. package/build/collaboration-policy/index.d.ts +4 -5
  13. package/build/collaboration-policy/index.js +3 -4
  14. package/build/collaboration-policy/types/collaboration-policy.d.ts +1370 -0
  15. package/build/collaboration-policy/types/collaboration-policy.js +274 -0
  16. package/build/collaboration-policy/types/index.d.ts +2 -0
  17. package/build/collaboration-policy/types/index.js +1 -0
  18. package/build/collaboration-policy/useCollaborationPolicy.d.ts +4 -13
  19. package/build/collaboration-policy/useCollaborationPolicy.js +1 -23
  20. package/build/collaboration-policy/utils/path-helpers.d.ts +3 -7
  21. package/build/collaboration-policy/utils/path-helpers.js +22 -6
  22. package/build/company-info/index.d.ts +1 -1
  23. package/build/connections/index.d.ts +1 -1
  24. package/build/contracts/index.d.ts +1 -1
  25. package/build/data-planes/types.d.ts +1 -1
  26. package/build/data-streams/index.d.ts +1 -1
  27. package/build/datasets/index.d.ts +12 -12
  28. package/build/datasets/index.js +18 -13
  29. package/build/datasets/statistics-types.d.ts +81 -0
  30. package/build/datasets/types.d.ts +60 -13
  31. package/build/datasets/types.js +1 -0
  32. package/build/forecast/index.d.ts +1 -1
  33. package/build/index.d.ts +1 -0
  34. package/build/index.js +1 -0
  35. package/build/installations/index.d.ts +1 -1
  36. package/build/jobs/index.d.ts +1 -1
  37. package/build/jobs/types.d.ts +1 -0
  38. package/build/mappings/index.d.ts +1 -1
  39. package/build/model-inference/index.d.ts +1 -1
  40. package/build/model-training/index.d.ts +1 -1
  41. package/build/models/index.d.ts +1 -1
  42. package/build/nql/Ast.d.ts +1 -1
  43. package/build/nql/index.d.ts +1 -1
  44. package/build/nql/index.js +1 -1
  45. package/build/products/index.d.ts +1 -1
  46. package/build/queries/index.d.ts +1 -1
  47. package/build/resources/index.d.ts +1 -1
  48. package/build/rosetta/types.d.ts +1 -1
  49. package/build/rosetta/types.js +1 -1
  50. package/build/rosetta-stone/index.d.ts +1 -1
  51. package/build/subscriptions/index.d.ts +1 -1
  52. package/build/uploads/index.d.ts +1 -1
  53. package/build/views/index.d.ts +1 -1
  54. package/build/workflows/index.d.ts +1 -1
  55. package/package.json +10 -11
  56. package/build/collaboration-policy/core/jsonschema/json-schema-types.d.ts +0 -45
  57. package/build/collaboration-policy/core/jsonschema/policy-branches.d.ts +0 -49
  58. package/build/collaboration-policy/core/jsonschema/policy-branches.js +0 -1
  59. package/build/collaboration-policy/core/jsonschema/policy-evaluator.d.ts +0 -22
  60. package/build/collaboration-policy/core/jsonschema/policy-evaluator.js +0 -260
  61. package/build/collaboration-policy/core/jsonschema/sql-builder.d.ts +0 -79
  62. package/build/collaboration-policy/core/jsonschema/sql-builder.js +0 -305
  63. package/build/collaboration-policy/core/jsonschema/sql-poc.d.ts +0 -79
  64. package/build/collaboration-policy/core/jsonschema/sql-poc.js +0 -305
  65. package/build/nql/SubstraitParser.d.ts +0 -771
  66. package/build/nql/SubstraitParser.js +0 -797
  67. /package/build/{collaboration-policy/core/jsonschema/json-schema-types.js → datasets/statistics-types.js} +0 -0
@@ -22,6 +22,9 @@ export interface Dataset {
22
22
  external_id?: string;
23
23
  data_plane?: DataPlane;
24
24
  materialized_view_config?: string;
25
+ compute_pool_config?: {
26
+ default_compute_pool_id?: string;
27
+ };
25
28
  }
26
29
  export interface DatasetStats extends DatasetSummaryStatistics {
27
30
  last_snapshot_added_bytes: number;
@@ -78,8 +81,6 @@ export interface DatasetTableSummaryAPIResponse {
78
81
  export type SchemaPropertiesType = "string" | "boolean" | "double" | "long" | "timestamptz" | "object" | "array";
79
82
  export type DatasetStatus = "active" | "archived" | "pending";
80
83
  export type DatasetWriteMode = "append" | "overwrite";
81
- type ExpressionlessRetentionPolicyType = "retain_everything" | "expire_everything";
82
- type ExpressionedRetentionPolicyType = "retain_when" | "expire_when";
83
84
  type SchemaType = "object" | "value";
84
85
  export declare enum Operator {
85
86
  GreaterThan = ">",
@@ -87,16 +88,66 @@ export declare enum Operator {
87
88
  GreaterThanOrEqualTo = ">=",
88
89
  LessThanOrEqualTo = "<="
89
90
  }
91
+ export interface SnapshotAgeExpression {
92
+ type: "snapshot_age";
93
+ operator: Operator;
94
+ period: string;
95
+ }
90
96
  export type RetentionPolicy = {
91
- type: ExpressionlessRetentionPolicyType;
97
+ type: "retain_everything";
92
98
  } | {
93
- type: ExpressionedRetentionPolicyType;
94
- expression?: {
95
- type: "snapshot_age";
96
- operator: Operator;
97
- period: string;
98
- };
99
+ type: "expire_everything";
100
+ } | {
101
+ type: "retain_when";
102
+ expression?: SnapshotAgeExpression;
103
+ } | {
104
+ type: "expire_when";
105
+ expression?: SnapshotAgeExpression;
99
106
  };
107
+ export interface RowClock {
108
+ kind: "event_time";
109
+ attribute?: string;
110
+ }
111
+ export type TTLPolicyKind = "row_ttl" | "table_ttl" | "snapshot_ttl";
112
+ export interface RowTTLPolicy {
113
+ type: {
114
+ kind: "row_ttl";
115
+ clock?: RowClock;
116
+ };
117
+ enabled: boolean;
118
+ interval: string;
119
+ }
120
+ export type TableClockKind = "created_at" | "max_event_time" | "static_time";
121
+ export interface TableClock {
122
+ kind: TableClockKind;
123
+ column?: string;
124
+ }
125
+ export interface TableTTLPolicy {
126
+ type: {
127
+ kind: "table_ttl";
128
+ clock: TableClock;
129
+ };
130
+ enabled: boolean;
131
+ interval: string;
132
+ }
133
+ export interface SnapshotTTLPolicy {
134
+ type: {
135
+ kind: "snapshot_ttl";
136
+ };
137
+ enabled: boolean;
138
+ interval: string;
139
+ snapshot_retention_policy: RetentionPolicy;
140
+ }
141
+ export type TTLPolicy = RowTTLPolicy | TableTTLPolicy | SnapshotTTLPolicy;
142
+ export interface RetentionScheduleConfig {
143
+ schedule: string;
144
+ schedule_zone_id?: string;
145
+ status?: "active" | "pending" | "archived";
146
+ }
147
+ export interface UpsertRetentionPoliciesRequest {
148
+ policies: TTLPolicy[];
149
+ schedule_config?: RetentionScheduleConfig;
150
+ }
100
151
  export type SchemaFileConfigType = "flat" | "json" | "parquet";
101
152
  export interface FlatFileConfig {
102
153
  type: "flat";
@@ -244,10 +295,6 @@ export interface CreateDatasetRequest {
244
295
  export interface IngestDatasetFileRequest {
245
296
  source_file: string;
246
297
  }
247
- export interface DatasetInterfaceValidation {
248
- accepted: string[];
249
- errors: Record<string, string[]>;
250
- }
251
298
  export interface UpdateDatasetRefreshScheduleRequest {
252
299
  cron?: string;
253
300
  cron_zone_id?: string;
@@ -1,3 +1,4 @@
1
+ // ---- Snapshot-level retention (legacy) ----
1
2
  export var Operator;
2
3
  (function (Operator) {
3
4
  Operator["GreaterThan"] = ">";
@@ -49,4 +49,4 @@ declare class ForecastApi extends BaseApi {
49
49
  */
50
50
  getPublicForecast(forecastId: string): Promise<ForecastResponse>;
51
51
  }
52
- export { ForecastApi, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type ForecastResult, type CostForecastResult, type ForecastResultFailure, type JobState, };
52
+ export { type CostForecastRequest, type CostForecastResponse, type CostForecastResult, ForecastApi, type ForecastRequest, type ForecastResponse, type ForecastResult, type ForecastResultFailure, type JobState, };
package/build/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export * from "./data-planes";
15
15
  export * from "./data-planes/types";
16
16
  export * from "./data-streams";
17
17
  export * from "./datasets";
18
+ export * from "./datasets/statistics-types";
18
19
  export * from "./datasets/types";
19
20
  export * from "./encryption-materials";
20
21
  export * from "./encryption-materials/types";
package/build/index.js CHANGED
@@ -15,6 +15,7 @@ export * from "./data-planes";
15
15
  export * from "./data-planes/types";
16
16
  export * from "./data-streams";
17
17
  export * from "./datasets";
18
+ export * from "./datasets/statistics-types";
18
19
  export * from "./datasets/types";
19
20
  export * from "./encryption-materials";
20
21
  export * from "./encryption-materials/types";
@@ -15,4 +15,4 @@ declare class InstallationsApi extends BaseApi {
15
15
  getInstallations(appCategory?: string): Promise<ApiRecords<Installation>>;
16
16
  getInstallationProfiles(installationId: number): Promise<ApiRecords<Profile>>;
17
17
  }
18
- export { type Installation, type Profile, InstallationsApi };
18
+ export { type Installation, InstallationsApi, type Profile };
@@ -31,4 +31,4 @@ declare class JobsApi extends BaseApi {
31
31
  */
32
32
  cancelJob(jobId: string): Promise<void>;
33
33
  }
34
- export { type Job, type JobRequestSource, type JobRequestSourceApiUser, type JobRequestSourceProcess, type ForecastInput, type ForecastJob, type ExplainInput, type ExplainJob, type ExplainOutput, type MaterializedViewInput, type MaterializedViewJob, type MaterializedViewOutput, type DeleteInput, type DatasetsDeleteTableJob, type DeliverInput, type DatasetsDeliverDataJob, type SampleInput, type DatasetsSampleJob, type ColumnDetails, type StatsInput, type DatasetsCalculateColumnStatsJob, type ModelTrainingRunInput, type ModelTrainingRunJob, type ModelsDeliverModelInput, type ModelsDeliverModelJob, type ModelInferenceRunInput, type ModelInferenceRunJob, type ModelInferenceRunJobResult, type GetJobsParameters, JobsApi, };
34
+ export { type ColumnDetails, type DatasetsCalculateColumnStatsJob, type DatasetsDeleteTableJob, type DatasetsDeliverDataJob, type DatasetsSampleJob, type DeleteInput, type DeliverInput, type ExplainInput, type ExplainJob, type ExplainOutput, type ForecastInput, type ForecastJob, type GetJobsParameters, type Job, type JobRequestSource, type JobRequestSourceApiUser, type JobRequestSourceProcess, JobsApi, type MaterializedViewInput, type MaterializedViewJob, type MaterializedViewOutput, type ModelInferenceRunInput, type ModelInferenceRunJob, type ModelInferenceRunJobResult, type ModelsDeliverModelInput, type ModelsDeliverModelJob, type ModelTrainingRunInput, type ModelTrainingRunJob, type SampleInput, type StatsInput, };
@@ -19,6 +19,7 @@ interface BaseJob {
19
19
  type: JobType;
20
20
  request_source: JobRequestSource;
21
21
  data_plane_id?: string;
22
+ compute_pool_id?: string;
22
23
  state: JobState;
23
24
  executor?: string;
24
25
  idempotency_key: string;
@@ -111,4 +111,4 @@ declare class MappingsApi extends BaseApi {
111
111
  */
112
112
  getMapping(mappingId: string): Promise<Mapping>;
113
113
  }
114
- export { type Mapping, MappingsApi, type CreateMapping, type MappingExpressionDependencies, type MappingTestResult, type MappingTestResults, type ObjectMapping, type PropertyMapping, type RawMappingDefinition, type RawObjectMapping, type RawPropertyMapping, type RawValueMapping, type ValueMapping, };
114
+ export { type CreateMapping, type Mapping, type MappingExpressionDependencies, MappingsApi, type MappingTestResult, type MappingTestResults, type ObjectMapping, type PropertyMapping, type RawMappingDefinition, type RawObjectMapping, type RawPropertyMapping, type RawValueMapping, type ValueMapping, };
@@ -15,4 +15,4 @@ declare class ModelInferenceApi extends BaseApi {
15
15
  */
16
16
  runModelInference(request: ModelInferenceRunRequest): Promise<ModelInferenceRunJob>;
17
17
  }
18
- export { ModelInferenceApi, type InferenceConfig, type InferenceMessage, type InferenceModel, type InferenceUsage, type MessageRole, type ModelInferenceRunRequest, type ModelInferenceRunResult, };
18
+ export { type InferenceConfig, type InferenceMessage, type InferenceModel, type InferenceUsage, type MessageRole, ModelInferenceApi, type ModelInferenceRunRequest, type ModelInferenceRunResult, };
@@ -20,4 +20,4 @@ declare class ModelTrainingApi extends BaseApi {
20
20
  */
21
21
  trainClassifier(data: TrainClassifierRequest): Promise<TrainClassifierResponse>;
22
22
  }
23
- export { ModelTrainingApi, type OutputModel, type TrainModelRequest, type TrainModelResponse, type ModelTrainingConfig, type TrainClassifierRequest, type TrainClassifierResponse, };
23
+ export { ModelTrainingApi, type ModelTrainingConfig, type OutputModel, type TrainClassifierRequest, type TrainClassifierResponse, type TrainModelRequest, type TrainModelResponse, };
@@ -28,4 +28,4 @@ declare class ModelsApi extends BaseApi {
28
28
  */
29
29
  deleteModel(modelId: string): Promise<void>;
30
30
  }
31
- export { ModelsApi, type ModelCollaborators, type Model, type CreateModelRequest, type UpdateModelRequest, };
31
+ export { type CreateModelRequest, type Model, type ModelCollaborators, ModelsApi, type UpdateModelRequest, };
@@ -300,4 +300,4 @@ type NqlAst = {
300
300
  type: string;
301
301
  ast_metadata?: AstNodeMetadata;
302
302
  } & (NqlAstList | NqlAggFunction | NqlBinaryOp | NqlCase | NqlFunction | NqlLit | NqlIdent | NqlJoin | NqlTypeSpec | NqlOp | NqlWindow | NqlUnknown | NqlSelect | NqlCreateMaterializedView | NqlExplain | NqlWhen | NqlElse | NqlPlaceholder);
303
- export type { NqlAst, NqlAstList, NqlAggFunction, NqlBinaryOp, NqlBudget, NqlCase, NqlFunction, NqlSimpleType, NqlLit, NqlIdent, NqlIdentColumn, NqlIdentTable, NqlJoin, NqlJoinType, NqlJoinConditionType, NqlTypeSpec, NqlOp, NqlWindow, NqlUnknown, NqlSelect, NqlCreateMaterializedView, NqlExplain, NqlAstType, NqlPlaceholder, NqlElse, NqlWhen, NqlTemplateConstraintLogicalOperator, NqlTemplateConstraint, NqlTemplateConstraintGroup, ExtractPlaceholderType, };
303
+ export type { ExtractPlaceholderType, NqlAggFunction, NqlAst, NqlAstList, NqlAstType, NqlBinaryOp, NqlBudget, NqlCase, NqlCreateMaterializedView, NqlElse, NqlExplain, NqlFunction, NqlIdent, NqlIdentColumn, NqlIdentTable, NqlJoin, NqlJoinConditionType, NqlJoinType, NqlLit, NqlOp, NqlPlaceholder, NqlSelect, NqlSimpleType, NqlTemplateConstraint, NqlTemplateConstraintGroup, NqlTemplateConstraintLogicalOperator, NqlTypeSpec, NqlUnknown, NqlWhen, NqlWindow, };
@@ -43,7 +43,7 @@ declare class NqlApi extends BaseApi {
43
43
  */
44
44
  getNqlByJobId(id: string): Promise<NqlResult>;
45
45
  }
46
- export { NqlApi, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, };
47
46
  export * from "./Ast";
48
47
  export * from "./AstParser";
49
48
  export * from "./NqlBuilder";
49
+ export { type Nql, NqlApi, type NqlBooleanExpression, type NqlCompileResult, type NqlExpression, type NqlField, type NqlFilterBinaryExpression, type NqlFilterExpression, type NqlFilterUnaryExpression, type NqlQueryInput, type NqlResult, type NqlWhere, };
@@ -63,7 +63,7 @@ class NqlApi extends BaseApi {
63
63
  return await this.get(`${resourceName}/${id}`);
64
64
  }
65
65
  }
66
- export { NqlApi, };
67
66
  export * from "./Ast";
68
67
  export * from "./AstParser";
69
68
  export * from "./NqlBuilder";
69
+ export { NqlApi, };
@@ -12,4 +12,4 @@ declare class ProductsApi extends BaseApi {
12
12
  */
13
13
  getHealthCheck(): Promise<Product[]>;
14
14
  }
15
- export { ProductsApi, type Product };
15
+ export { type Product, ProductsApi };
@@ -42,4 +42,4 @@ declare class QueriesApi extends BaseApi {
42
42
  */
43
43
  updateQuery(queryId: string, data: UpdateNqlQueryRequest): Promise<NqlQueryResponse>;
44
44
  }
45
- export { QueriesApi, type CreateNqlQueryRequest, type UpdateNqlQueryRequest, type NqlQueryResponse, type NqlSharedQueryResponse, type NqlOwnedQueryResponse, type NqlQueryCollaborators, type NqlQueryOwner, type NqlQueryMetadata, type NqlQueryAst, };
45
+ export { type CreateNqlQueryRequest, type NqlOwnedQueryResponse, type NqlQueryAst, type NqlQueryCollaborators, type NqlQueryMetadata, type NqlQueryOwner, type NqlQueryResponse, type NqlSharedQueryResponse, QueriesApi, type UpdateNqlQueryRequest, };
@@ -5,7 +5,7 @@
5
5
  import { BaseApi } from "../base-api";
6
6
  import type { ApiRecords } from "../types";
7
7
  import type { BucketCreationRequest, Resource, UpdateAccessTypeRequest } from "./types";
8
- export type { Resource, BucketCreationRequest, UpdateAccessTypeRequest };
8
+ export type { BucketCreationRequest, Resource, UpdateAccessTypeRequest };
9
9
  /**
10
10
  * @class ResourceApi
11
11
  * @extends {BaseApi}
@@ -311,4 +311,4 @@ interface RespomseMessage {
311
311
  }
312
312
  type RosettaResponseMessage = InfoMessage | HistoryMessage | ConversationUpdatedMessage | PongMessage | ErrorMessage | ThoughtMessage | RespomseMessage | ConversationListMessage;
313
313
  declare function isType<T>(input: unknown, schema: z.ZodType<T>): input is T;
314
- export { type ConversationMessageRole, isConversationMessageRole, type ConversationMessageName, isConversationMessageName, type ConversationUserMessage, isConversationUserMessage, type ConversationAssistantMessage, isConversationAssistantMessage, type ConversationSystemMessage, isConversationSystemMessage, type ConversationFunctionMessage, isConversationFunctionMessage, type ConversationMessage, isConversationMessage, type ConversationIOMessage, isConversationInputMessage, type ConversationMessages, isConversationMessages, isType, type RosettaRequestMessage, isRosettaRequestMessage, type RosettaResponseMessage, type ConversationMessageFunctionCall, isConversationMessageFunctionCall, type ConversationAssistantMessageWithFunctionCall, isConversationAssistantMessageWithFunctionCall, type ConversationAssistantMessageWithoutFunctionCall, isConversationAssistantMessageWithoutFunctionCall, };
314
+ export { type ConversationAssistantMessage, type ConversationAssistantMessageWithFunctionCall, type ConversationAssistantMessageWithoutFunctionCall, type ConversationFunctionMessage, type ConversationIOMessage, type ConversationMessage, type ConversationMessageFunctionCall, type ConversationMessageName, type ConversationMessageRole, type ConversationMessages, type ConversationSystemMessage, type ConversationUserMessage, isConversationAssistantMessage, isConversationAssistantMessageWithFunctionCall, isConversationAssistantMessageWithoutFunctionCall, isConversationFunctionMessage, isConversationInputMessage, isConversationMessage, isConversationMessageFunctionCall, isConversationMessageName, isConversationMessageRole, isConversationMessages, isConversationSystemMessage, isConversationUserMessage, isRosettaRequestMessage, isType, type RosettaRequestMessage, type RosettaResponseMessage, };
@@ -225,4 +225,4 @@ function isType(input, schema) {
225
225
  /// ///////////////////
226
226
  // Exports
227
227
  /// ///////////////////
228
- export { isConversationMessageRole, isConversationMessageName, isConversationUserMessage, isConversationAssistantMessage, isConversationSystemMessage, isConversationFunctionMessage, isConversationMessage, isConversationInputMessage, isConversationMessages, isType, isRosettaRequestMessage, isConversationMessageFunctionCall, isConversationAssistantMessageWithFunctionCall, isConversationAssistantMessageWithoutFunctionCall, };
228
+ export { isConversationAssistantMessage, isConversationAssistantMessageWithFunctionCall, isConversationAssistantMessageWithoutFunctionCall, isConversationFunctionMessage, isConversationInputMessage, isConversationMessage, isConversationMessageFunctionCall, isConversationMessageName, isConversationMessageRole, isConversationMessages, isConversationSystemMessage, isConversationUserMessage, isRosettaRequestMessage, isType, };
@@ -14,4 +14,4 @@ declare class RosettaStoneApi extends BaseApi {
14
14
  response: Mapping[];
15
15
  }>;
16
16
  }
17
- export { RosettaStoneApi, type SampleRecords, type RosettaStoneResponse, type SampleRecord, };
17
+ export { RosettaStoneApi, type RosettaStoneResponse, type SampleRecord, type SampleRecords, };
@@ -13,4 +13,4 @@ declare class SubscriptionsApi extends BaseApi {
13
13
  */
14
14
  getSubscriptions(): Promise<ApiRecords<Subscription>>;
15
15
  }
16
- export { type Subscription, type SubscriptionDetails, type DataStreamSubscriptionDetails, type MarketplaceSubscriptionDetails, type SubscriptionOutput, type SubscriptionType, type SubscriptionStatus, type SubscriptionBudget, SubscriptionsApi, };
16
+ export { type DataStreamSubscriptionDetails, type MarketplaceSubscriptionDetails, type Subscription, type SubscriptionBudget, type SubscriptionDetails, type SubscriptionOutput, type SubscriptionStatus, SubscriptionsApi, type SubscriptionType, };
@@ -33,4 +33,4 @@ declare class UploadsApi extends BaseApi {
33
33
  */
34
34
  uploadFileToS3(file: File, uploadInfo: UploadsResponse): Promise<boolean>;
35
35
  }
36
- export { type UploadsResponse, type ConfirmDatasetUpload, UploadsApi };
36
+ export { type ConfirmDatasetUpload, UploadsApi, type UploadsResponse };
@@ -42,4 +42,4 @@ declare class ViewsApi extends BaseApi {
42
42
  */
43
43
  updateView(viewId: string, data: UpdateViewRequest): Promise<View>;
44
44
  }
45
- export { ViewsApi, type View, type OwnedView, type SharedView, type ViewOwner, type CreateViewRequest, type UpdateViewRequest, };
45
+ export { type CreateViewRequest, type OwnedView, type SharedView, type UpdateViewRequest, type View, type ViewOwner, ViewsApi, };
@@ -63,4 +63,4 @@ declare class WorkflowsApi extends BaseApi {
63
63
  */
64
64
  listWorkflowRuns(workflowId: string, params?: ListRunsParams): Promise<ListRunsResponse>;
65
65
  }
66
- export { WorkflowsApi, type CreateWorkflowRequest, type CreateWorkflowResponse, type ListRunsParams, type ListRunsResponse, type ListWorkflowsResponse, type ScheduleWorkflowRequest, type ScheduleWorkflowResponse, type TriggerWorkflowResponse, type WorkflowResponse, type WorkflowRun, type WorkflowRunStatus, type WorkflowStatus, };
66
+ export { type CreateWorkflowRequest, type CreateWorkflowResponse, type ListRunsParams, type ListRunsResponse, type ListWorkflowsResponse, type ScheduleWorkflowRequest, type ScheduleWorkflowResponse, type TriggerWorkflowResponse, type WorkflowResponse, type WorkflowRun, type WorkflowRunStatus, type WorkflowStatus, WorkflowsApi, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "2.95.0-beta.0",
3
+ "version": "2.95.1",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",
@@ -26,22 +26,21 @@
26
26
  "license": "ISC",
27
27
  "devDependencies": {
28
28
  "@babel/core": "7.29.0",
29
- "@babel/preset-env": "7.29.0",
29
+ "@babel/preset-env": "7.29.2",
30
30
  "@babel/preset-typescript": "7.28.5",
31
- "@biomejs/biome": "2.3.14",
32
- "@commitlint/cli": "20.4.1",
33
- "@commitlint/config-conventional": "20.4.1",
31
+ "@biomejs/biome": "2.4.8",
32
+ "@commitlint/cli": "20.5.0",
33
+ "@commitlint/config-conventional": "20.5.0",
34
34
  "@types/jest": "30.0.0",
35
- "@types/json-schema": "^7.0.15",
36
- "babel-jest": "30.2.0",
37
- "jest": "30.2.0",
38
- "lefthook": "2.1.0",
35
+ "babel-jest": "30.3.0",
36
+ "jest": "30.3.0",
37
+ "lefthook": "2.1.4",
39
38
  "ts-jest": "29.4.6"
40
39
  },
41
40
  "dependencies": {
42
- "bignumber.js": "9.3.1",
43
41
  "mande": "2.0.9",
44
- "zod": "4.3.6"
42
+ "zod": "4.3.6",
43
+ "bignumber.js": "10.0.2"
45
44
  },
46
45
  "overrides": {
47
46
  "semver@<7.5.2": "7.5.2"
@@ -1,45 +0,0 @@
1
- import type { JSONSchema7 } from "json-schema";
2
- /**
3
- * Base JSON Schema type used for connector policies.
4
- *
5
- * Uses JSONSchema7 as a structural base. The real API schemas declare
6
- * `$schema: "https://json-schema.org/draft/2020-12/schema"` and are
7
- * validated with AJV 2020-12.
8
- */
9
- export type JsonSchema = JSONSchema7;
10
- /**
11
- * Shape of a JSON-Schema-based connector policy as returned by the backend API.
12
- *
13
- * The `policy` field is a JSON Schema document that must be satisfied
14
- * by `dataset.schema`. Refresh schedule lives in `metadata.refresh_schedule.max`.
15
- *
16
- * Filters live on property definitions inside the schema (as `filters` arrays
17
- * on individual attribute entries), not on anyOf branches.
18
- */
19
- export interface JsonSchemaConnectorPolicy {
20
- /** Stable identifier (e.g., "audience_first_party_new"). */
21
- name: string;
22
- /** Policy ID, typically matches name. */
23
- id: string;
24
- /** The app this policy belongs to. */
25
- app_id: number;
26
- /** Metadata including tags and refresh schedule. */
27
- metadata: {
28
- tags?: string[];
29
- refresh_schedule?: {
30
- min: string | null;
31
- max: string;
32
- };
33
- };
34
- /**
35
- * The JSON Schema that must be satisfied by dataset.schema.
36
- * Contains `properties`, `required`, `anyOf`/`allOf` for branch structure.
37
- * Filters are on property definitions (sibling `properties` next to `anyOf`).
38
- * May declare `$schema: "https://json-schema.org/draft/2020-12/schema"`.
39
- */
40
- policy: JsonSchema;
41
- /** UI form schema — not used by the SDK. */
42
- schema?: any;
43
- /** UI schema — not used by the SDK. */
44
- uischema?: any;
45
- }
@@ -1,49 +0,0 @@
1
- import type { PolicyFilter } from "../types";
2
- import type { JsonSchemaConnectorPolicy } from "./json-schema-types";
3
- /**
4
- * A single logical branch within a JSON-Schema policy that matched the dataset.
5
- * Typically corresponds to one entry in schema.properties.properties.anyOf[*],
6
- * or an allOf group inside one of those entries.
7
- */
8
- export interface PolicyBranchMatch {
9
- /**
10
- * Index into the top-level anyOf array under the policy's
11
- * `policy.properties.properties.anyOf`.
12
- */
13
- branchIndex: number;
14
- /**
15
- * Required attribute names for this branch. These correspond to Schema.properties keys
16
- * like "sha256_hashed_email", "postal_code", etc.
17
- */
18
- requiredAttributes: string[];
19
- /**
20
- * Filters collected from the property definitions for this branch's required attributes.
21
- * Filters live on the property definitions (sibling `properties` to `anyOf`), not on branches.
22
- * These follow the existing PolicyFilter structure and can be fed directly into filterToSql.
23
- */
24
- filters: PolicyFilter[];
25
- /**
26
- * Additional required subfield paths per attribute, used to generate IS NOT NULL WHERE clauses.
27
- * Derived from `$ref` resolution against `$defs` in the JSON Schema.
28
- *
29
- * Example: for `sha256_hashed_phone_number` referencing an object-type `$def`,
30
- * this produces `(company_data."ds"."_rosetta_stone"."sha256_hashed_phone_number"."type" IS NOT NULL)`.
31
- */
32
- additionalRequiredProperties: Array<{
33
- attributeName: string;
34
- paths: string[];
35
- }>;
36
- }
37
- /**
38
- * Evaluation result for a single JSON-Schema-based policy.
39
- */
40
- export interface PolicyEvaluation {
41
- /** The policy that was evaluated. */
42
- policy: JsonSchemaConnectorPolicy;
43
- /** Whether dataset.schema is compatible with the policy's JSON Schema. */
44
- isValid: boolean;
45
- /** Branches within the policy that are satisfied for this dataset. */
46
- matches: PolicyBranchMatch[];
47
- /** Human-readable validation issues if isValid === false. */
48
- errors: string[];
49
- }
@@ -1,22 +0,0 @@
1
- import type { Attribute } from "../../../attributes/types";
2
- import type { Dataset } from "../../../datasets/types";
3
- import type { JsonSchemaConnectorPolicy } from "./json-schema-types";
4
- import type { PolicyEvaluation } from "./policy-branches";
5
- /**
6
- * Evaluate an array of JSON-Schema-based connector policies against a dataset.
7
- *
8
- * Eligibility is determined by checking whether the dataset's Rosetta Stone
9
- * attributes satisfy at least one anyOf branch in the policy schema. This uses
10
- * the `attributes` array (resolved from dataset mappings) as the source of truth,
11
- * NOT the raw dataset.schema — the raw schema contains storage-level column names
12
- * and flat types that don't match the policy's Rosetta Stone attribute names.
13
- *
14
- * A policy is considered valid (compatible) if `findMatchingBranches` finds at
15
- * least one satisfied branch.
16
- *
17
- * @param _dataset - The dataset (currently unused; attributes carry the relevant info).
18
- * @param attributes - Rosetta Stone attributes associated with the dataset.
19
- * @param policies - JSON-Schema-based connector policies to evaluate.
20
- * @returns An array of PolicyEvaluation results, one per policy.
21
- */
22
- export declare function evaluateJsonSchemaPolicies(_dataset: Dataset, attributes: Attribute[], policies: JsonSchemaConnectorPolicy[]): PolicyEvaluation[];