@narrative.io/data-collaboration-sdk-ts 0.26.0 → 1.0.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 (50) hide show
  1. package/build/access-rules/index.d.ts +1 -1
  2. package/build/access-rules/types.d.ts +1 -1
  3. package/build/access-tokens/index.d.ts +2 -2
  4. package/build/apps/index.d.ts +2 -2
  5. package/build/attributes/index.d.ts +2 -2
  6. package/build/authentication/index.d.ts +1 -1
  7. package/build/base-api.d.ts +3 -3
  8. package/build/company-info/index.d.ts +2 -2
  9. package/build/connections/index.d.ts +1 -1
  10. package/build/contracts/index.d.ts +1 -1
  11. package/build/data-planes/index.d.ts +1 -1
  12. package/build/data-streams/index.d.ts +2 -2
  13. package/build/data-streams/index.js +1 -3
  14. package/build/data-streams/types.d.ts +1 -1
  15. package/build/datasets/index.d.ts +15 -15
  16. package/build/datasets/index.js +12 -12
  17. package/build/datasets/types.d.ts +1 -1
  18. package/build/forecast/index.d.ts +1 -1
  19. package/build/forecast/types.d.ts +1 -1
  20. package/build/health/index.d.ts +1 -1
  21. package/build/index.d.ts +36 -36
  22. package/build/index.js +23 -23
  23. package/build/installations/index.d.ts +2 -2
  24. package/build/jobs/index.d.ts +2 -2
  25. package/build/jobs/types.d.ts +3 -3
  26. package/build/mappings/index.d.ts +2 -2
  27. package/build/mappings/index.js +3 -3
  28. package/build/nql/AstParser.js +10 -15
  29. package/build/nql/AstTraverse.d.ts +1 -1
  30. package/build/nql/AstTraverse.js +4 -4
  31. package/build/nql/DataRulesConverter.d.ts +2 -2
  32. package/build/nql/DataRulesConverter.js +20 -23
  33. package/build/nql/NQLParser.js +23 -31
  34. package/build/nql/NqlBuilder.d.ts +3 -2
  35. package/build/nql/NqlBuilder.js +28 -26
  36. package/build/nql/SubstraitParser.d.ts +1 -2
  37. package/build/nql/SubstraitParser.js +27 -39
  38. package/build/nql/index.d.ts +2 -2
  39. package/build/nql/types.d.ts +1 -1
  40. package/build/ping/index.d.ts +1 -1
  41. package/build/products/index.d.ts +1 -1
  42. package/build/resources/index.d.ts +3 -3
  43. package/build/rosetta-stone/index.d.ts +1 -1
  44. package/build/subscriptions/index.d.ts +2 -2
  45. package/build/subscriptions/types.d.ts +2 -2
  46. package/build/uploads/index.d.ts +1 -1
  47. package/build/uploads/index.js +1 -3
  48. package/build/utils.js +7 -11
  49. package/build/whoami/index.d.ts +1 -1
  50. package/package.json +43 -45
@@ -2,10 +2,10 @@
2
2
  * @fileoverview This module provides methods for fetching resources.
3
3
  * @author Your Name
4
4
  */
5
- import { type ApiRecords } from "../types";
6
5
  import { BaseApi } from "../base-api";
7
- import { type Resource, type BucketCreationRequest, type UpdateAccessTypeRequest } from "./types";
8
- export { type Resource, type BucketCreationRequest, type UpdateAccessTypeRequest, };
6
+ import type { ApiRecords } from "../types";
7
+ import type { BucketCreationRequest, Resource, UpdateAccessTypeRequest } from "./types";
8
+ export type { Resource, BucketCreationRequest, UpdateAccessTypeRequest };
9
9
  /**
10
10
  * @class ResourceApi
11
11
  * @extends {BaseApi}
@@ -1,6 +1,6 @@
1
1
  import type { Mapping } from "src/mappings/types";
2
2
  import { BaseApi } from "../base-api";
3
- import type { RosettaStoneResponse, SampleRecords, SampleRecord } from "./types";
3
+ import type { RosettaStoneResponse, SampleRecord, SampleRecords } from "./types";
4
4
  declare class RosettaStoneApi extends BaseApi {
5
5
  getLabelsFromSample(sample: SampleRecords): Promise<RosettaStoneResponse[]>;
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { type ApiRecords } from "../types";
2
1
  import { BaseApi } from "../base-api";
3
- import { type Subscription, type SubscriptionDetails, type DataStreamSubscriptionDetails, type MarketplaceSubscriptionDetails, type SubscriptionOutput, type SubscriptionType, type SubscriptionStatus, type SubscriptionBudget } from "./types";
2
+ import type { ApiRecords } from "../types";
3
+ import type { DataStreamSubscriptionDetails, MarketplaceSubscriptionDetails, Subscription, SubscriptionBudget, SubscriptionDetails, SubscriptionOutput, SubscriptionStatus, SubscriptionType } from "./types";
4
4
  /**
5
5
  * @module SubscriptionsApi
6
6
  * @description This module provides methods for interacing with subscriptions
@@ -1,5 +1,5 @@
1
- import { type Offer, type DataRules, type CompanyConstraint } from "src/data-streams/types";
2
- import { type DatasetConstraint } from "src/forecast/types";
1
+ import type { CompanyConstraint, DataRules, Offer } from "src/data-streams/types";
2
+ import type { DatasetConstraint } from "src/forecast/types";
3
3
  export interface Subscription {
4
4
  id: string;
5
5
  budget: SubscriptionBudget;
@@ -1,5 +1,5 @@
1
1
  import { BaseApi } from "../base-api";
2
- import { type ConfirmDatasetUpload, type UploadsResponse } from "./types";
2
+ import type { ConfirmDatasetUpload, UploadsResponse } from "./types";
3
3
  /**
4
4
  * API class for handling file uploads.
5
5
  * @extends BaseApi
@@ -67,9 +67,7 @@ class UploadsApi extends BaseApi {
67
67
  if (response.status === 200) {
68
68
  return true;
69
69
  }
70
- else {
71
- return false;
72
- }
70
+ return false;
73
71
  }
74
72
  catch (error) {
75
73
  console.error("Upload failed:", error);
package/build/utils.js CHANGED
@@ -1,14 +1,10 @@
1
- // This can live anywhere in your codebase:
1
+ // biome-ignore lint/suspicious/noExplicitAny: blah
2
2
  export function applyMixins(derivedCtor, constructors) {
3
- constructors.forEach((baseCtor) => {
4
- Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
5
- let propertyDescriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name);
6
- if (propertyDescriptor === null || propertyDescriptor === undefined) {
7
- propertyDescriptor = {};
8
- }
9
- Object.defineProperty(derivedCtor.prototype, name, propertyDescriptor);
10
- });
11
- });
3
+ for (const baseCtor of constructors) {
4
+ for (const name of Object.getOwnPropertyNames(baseCtor.prototype))
5
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name) ||
6
+ Object.create(null));
7
+ }
12
8
  }
13
9
  /**
14
10
  * Adds a trailing slash to the given string if it doesn't already end with one.
@@ -16,5 +12,5 @@ export function applyMixins(derivedCtor, constructors) {
16
12
  * @returns The modified string with a trailing slash.
17
13
  */
18
14
  export function addTrailingSlash(str) {
19
- return str.endsWith("/") ? str : str + "/";
15
+ return str.endsWith("/") ? str : `${str}/`;
20
16
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseApi } from "../base-api";
2
- import { type User } from "../whoami/types";
2
+ import type { User } from "../whoami/types";
3
3
  /**
4
4
  * A class for accessing the Ping API.
5
5
  * @extends BaseApi
package/package.json CHANGED
@@ -1,47 +1,45 @@
1
1
  {
2
- "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "0.26.0",
4
- "main": "build/index.js",
5
- "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
- "source": "src/index.ts",
7
- "types": "build/index.d.ts",
8
- "description": "",
9
- "scripts": {
10
- "build": "tsc",
11
- "lint": "npx eslint . --fix",
12
- "prepare": "npx eslint . --fix && npm run build && husky install",
13
- "prepublishOnly": "npm test && npm run lint",
14
- "preversion": "npm run lint",
15
- "version": "npm run && git add -A src",
16
- "postversion": "git push && git push --tags",
17
- "test": "jest --coverage"
18
- },
19
- "keywords": [],
20
- "author": "",
21
- "license": "ISC",
22
- "devDependencies": {
23
- "@babel/core": "^7.22.5",
24
- "@babel/preset-env": "^7.22.5",
25
- "@babel/preset-typescript": "^7.18.6",
26
- "@commitlint/cli": "^19.0.1",
27
- "@commitlint/config-conventional": "^19.0.3",
28
- "@types/jest": "^29.5.0",
29
- "babel-jest": "^29.4.3",
30
- "eslint-config-prettier": "^9.0.0",
31
- "eslint-config-standard-with-typescript": "^43.0.0",
32
- "eslint-plugin-prettier": "^5.0.0",
33
- "husky": "^9.0.5",
34
- "jest": "^29.4.3",
35
- "ts-jest": "^29.0.5"
36
- },
37
- "dependencies": {
38
- "mande": "^2.0.3",
39
- "zod": "^3.21.4"
40
- },
41
- "overrides": {
42
- "semver@<7.5.2": "7.5.2"
43
- },
44
- "files": [
45
- "build"
46
- ]
2
+ "name": "@narrative.io/data-collaboration-sdk-ts",
3
+ "version": "1.0.0",
4
+ "main": "build/index.js",
5
+ "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
+ "source": "src/index.ts",
7
+ "types": "build/index.d.ts",
8
+ "description": "",
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "lint": "npx @biomejs/biome check --apply ./src",
12
+ "prepare": "npx @biomejs/biome check --apply ./src && npm run build",
13
+ "prepublishOnly": "npm test && npm run lint",
14
+ "preversion": "npm run lint",
15
+ "version": "npm run && git add -A src",
16
+ "postversion": "git push && git push --tags",
17
+ "test": "jest --coverage"
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "devDependencies": {
23
+ "@babel/core": "7.24.0",
24
+ "@babel/preset-env": "7.24.0",
25
+ "@babel/preset-typescript": "7.23.3",
26
+ "@biomejs/biome": "1.6.1",
27
+ "@commitlint/cli": "19.2.0",
28
+ "@commitlint/config-conventional": "19.1.0",
29
+ "@types/jest": "29.5.12",
30
+ "babel-jest": "29.7.0",
31
+ "jest": "29.7.0",
32
+ "lefthook": "1.6.7",
33
+ "ts-jest": "29.1.2"
34
+ },
35
+ "dependencies": {
36
+ "mande": "2.0.8",
37
+ "zod": "3.22.4"
38
+ },
39
+ "overrides": {
40
+ "semver@<7.5.2": "7.5.2"
41
+ },
42
+ "files": [
43
+ "build"
44
+ ]
47
45
  }