@narrative.io/data-collaboration-sdk-ts 0.0.3 → 0.0.4
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.
- package/dist/{src/base-api.d.ts → base-api.d.ts} +0 -0
- package/dist/{src/datasets → datasets}/index.d.ts +0 -0
- package/dist/{src/health → health}/index.d.ts +0 -0
- package/dist/{src/index.d.ts → index.d.ts} +0 -0
- package/dist/{src/rosetta-stone → rosetta-stone}/index.d.ts +0 -0
- package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
- package/package.json +6 -2
- package/dist/src/datasets/types.d.ts +0 -45
- package/dist/src/health/types.d.ts +0 -11
- package/dist/src/rosetta-stone/types.d.ts +0 -12
- package/dist/src/types.d.ts +0 -20
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.m.js",
|
|
6
6
|
"umd:main": "dist/index.umd.js",
|
|
7
7
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
8
8
|
"source": "src/index.ts",
|
|
9
|
+
"types": "dist/data-collaboration-sdk-ts.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
"types": "./dist/data-collaboration-sdk-ts.d.ts"
|
|
12
|
+
},
|
|
9
13
|
"description": "",
|
|
10
14
|
"scripts": {
|
|
11
|
-
"build": "rm -rf dist && microbundle
|
|
15
|
+
"build": "rm -rf dist && microbundle --generateTypes true --tsconfig tsconfig.json",
|
|
12
16
|
"dev": "microbundle watch --tsconfig tsconfig.json",
|
|
13
17
|
"test": "vitest run --coverage",
|
|
14
18
|
"push": "npm run build && npm test && npm publish --access public"
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export interface Dataset {
|
|
2
|
-
id: number;
|
|
3
|
-
company_id: number;
|
|
4
|
-
created_at: string;
|
|
5
|
-
description: string;
|
|
6
|
-
name: string;
|
|
7
|
-
retention_policy: RetentionPolicy;
|
|
8
|
-
schema: Schema;
|
|
9
|
-
status: DatasetStatus;
|
|
10
|
-
tags: string[];
|
|
11
|
-
updated_at: Date;
|
|
12
|
-
write_mode: DatasetWriteMode;
|
|
13
|
-
}
|
|
14
|
-
type SchemaFileConfigType = "flat";
|
|
15
|
-
type SchemaPropertiesType = "string" | "number" | "boolean";
|
|
16
|
-
type DatasetStatus = "active" | "archived";
|
|
17
|
-
type DatasetWriteMode = "append" | "overwrite";
|
|
18
|
-
type RetentionPolicyType = "retain_everything";
|
|
19
|
-
type SchemaType = "object" | "value";
|
|
20
|
-
interface RetentionPolicy {
|
|
21
|
-
type: RetentionPolicyType;
|
|
22
|
-
}
|
|
23
|
-
interface SchemaFileConfig {
|
|
24
|
-
type: SchemaFileConfigType;
|
|
25
|
-
delimiter: string;
|
|
26
|
-
escape: string;
|
|
27
|
-
header: boolean;
|
|
28
|
-
quote: string;
|
|
29
|
-
}
|
|
30
|
-
interface SchemaProperties {
|
|
31
|
-
[key: string]: {
|
|
32
|
-
order: number;
|
|
33
|
-
approximate_cardinality: number;
|
|
34
|
-
description?: string;
|
|
35
|
-
type: SchemaPropertiesType;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
interface Schema {
|
|
39
|
-
file_config: SchemaFileConfig;
|
|
40
|
-
type: SchemaType;
|
|
41
|
-
properties: SchemaProperties;
|
|
42
|
-
required: string[];
|
|
43
|
-
primary: string;
|
|
44
|
-
}
|
|
45
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type HealthCheckResult = {
|
|
2
|
-
success: boolean;
|
|
3
|
-
checks: CheckResult[];
|
|
4
|
-
};
|
|
5
|
-
export type CheckResult = {
|
|
6
|
-
name: string;
|
|
7
|
-
type: HealthCheckResultType;
|
|
8
|
-
success: boolean;
|
|
9
|
-
error_message?: string | null;
|
|
10
|
-
};
|
|
11
|
-
export type HealthCheckResultType = "postgresql" | "s3";
|
package/dist/src/types.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Environment for the API.
|
|
3
|
-
*
|
|
4
|
-
* @typedef {'dev' | 'prod' | string} Environment
|
|
5
|
-
*/
|
|
6
|
-
export type Environment = 'dev' | 'prod' | string;
|
|
7
|
-
/**
|
|
8
|
-
* Configuration object for the BaseApi class.
|
|
9
|
-
*
|
|
10
|
-
* @typedef {Object} Config
|
|
11
|
-
* @property {string} [apiKey] - API key.
|
|
12
|
-
* @property {Environment} [environment='prod'] - Environment for the API (e.g. 'dev', 'prod').
|
|
13
|
-
*/
|
|
14
|
-
export type Config = {
|
|
15
|
-
apiKey?: string;
|
|
16
|
-
environment?: Environment;
|
|
17
|
-
};
|
|
18
|
-
export interface ApiRecords<T> {
|
|
19
|
-
records: T[];
|
|
20
|
-
}
|