@narrative.io/data-collaboration-sdk-ts 0.0.9 → 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.
@@ -1,4 +1,4 @@
1
- import type { Config } from './types';
1
+ import { type Config } from './types';
2
2
  /**
3
3
  * BaseApi class provides basic functionality for making API requests.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { type ApiRecords } from 'src/types';
1
+ import { type ApiRecords } from '../types';
2
2
  import { BaseApi } from '../base-api';
3
3
  import { type Dataset } from './types';
4
4
  /**
@@ -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 {};
@@ -1,5 +1,5 @@
1
1
  import { BaseApi } from '../base-api';
2
- import type { HealthCheckResult } from './types';
2
+ import { type HealthCheckResult } from './types';
3
3
  export declare class HealthCheckApi extends BaseApi {
4
4
  getHealthCheck(): Promise<HealthCheckResult>;
5
5
  }
@@ -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 {};
@@ -0,0 +1,10 @@
1
+ export interface SampleRecords {
2
+ sample: SampleRecord;
3
+ }
4
+ export type SampleRecord = Record<string, string | number | boolean>;
5
+ export interface RosettaStoneResponse {
6
+ label: number;
7
+ key: string;
8
+ name: string;
9
+ score: number;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -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.9",
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": "",