@narrative.io/data-collaboration-sdk-ts 0.0.8 → 0.0.10
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/build/base-api.d.ts +1 -1
- package/build/datasets/index.d.ts +1 -1
- package/build/datasets/types.d.ts +43 -0
- package/build/datasets/types.js +1 -0
- package/build/health/index.d.ts +1 -1
- package/build/health/types.d.ts +11 -0
- package/build/health/types.js +1 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +3 -3
- package/build/rosetta-stone/types.d.ts +10 -0
- package/build/rosetta-stone/types.js +1 -0
- package/build/types.d.ts +20 -0
- package/build/types.js +1 -0
- package/package.json +2 -2
package/build/base-api.d.ts
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
type SchemaProperties = Record<string, {
|
|
31
|
+
order: number;
|
|
32
|
+
approximate_cardinality: number;
|
|
33
|
+
description?: string;
|
|
34
|
+
type: SchemaPropertiesType;
|
|
35
|
+
}>;
|
|
36
|
+
interface Schema {
|
|
37
|
+
file_config: SchemaFileConfig;
|
|
38
|
+
type: SchemaType;
|
|
39
|
+
properties: SchemaProperties;
|
|
40
|
+
required: string[];
|
|
41
|
+
primary: string;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/health/index.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface HealthCheckResult {
|
|
2
|
+
success: boolean;
|
|
3
|
+
checks: CheckResult[];
|
|
4
|
+
}
|
|
5
|
+
export interface CheckResult {
|
|
6
|
+
name: string;
|
|
7
|
+
type: HealthCheckResultType;
|
|
8
|
+
success: boolean;
|
|
9
|
+
error_message?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export type HealthCheckResultType = 'postgresql' | 's3';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BaseApi } from './base-api';
|
|
2
|
+
import { DatasetApi } from './datasets';
|
|
2
3
|
import { HealthCheckApi } from './health';
|
|
4
|
+
import { RosettaStoneApi } from './rosetta-stone';
|
|
3
5
|
declare class NarrativeApi extends BaseApi {
|
|
4
6
|
}
|
|
5
|
-
interface NarrativeApi extends BaseApi, HealthCheckApi {
|
|
7
|
+
interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi {
|
|
6
8
|
}
|
|
7
9
|
export default NarrativeApi;
|
package/build/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseApi } from './base-api';
|
|
2
|
+
import { DatasetApi } from './datasets';
|
|
2
3
|
import { HealthCheckApi } from './health';
|
|
3
|
-
|
|
4
|
-
// import { RosettaStoneApi } from './rosetta-stone'
|
|
4
|
+
import { RosettaStoneApi } from './rosetta-stone';
|
|
5
5
|
import { applyMixins } from './utils';
|
|
6
6
|
class NarrativeApi extends BaseApi {
|
|
7
7
|
}
|
|
8
|
-
applyMixins(NarrativeApi, [BaseApi, HealthCheckApi]);
|
|
8
|
+
applyMixins(NarrativeApi, [BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi]);
|
|
9
9
|
export default NarrativeApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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 interface Config {
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
environment?: Environment;
|
|
17
|
+
}
|
|
18
|
+
export interface ApiRecords<T> {
|
|
19
|
+
records: T[];
|
|
20
|
+
}
|
package/build/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"preversion": "npm run lint",
|
|
18
18
|
"version": "npm run && git add -A src",
|
|
19
19
|
"postversion": "git push && git push --tags",
|
|
20
|
-
"test": "vitest --coverage"
|
|
20
|
+
"test": "vitest run --coverage"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [],
|
|
23
23
|
"author": "",
|